core: Improve error message if we hit an unreadable file

This commit is contained in:
Colin Walters 2012-05-02 10:21:41 -04:00
parent 26c484faed
commit 0660d9e5cf
1 changed files with 4 additions and 1 deletions

View File

@ -3565,10 +3565,13 @@ ostree_repo_load_file (OstreeRepo *self,
{ {
ret_input = (GInputStream*) g_file_read (loose_path, cancellable, error); ret_input = (GInputStream*) g_file_read (loose_path, cancellable, error);
if (!ret_input) if (!ret_input)
{
g_prefix_error (error, "Error opening loose file object %s: ", ot_gfile_get_path_cached (loose_path));
goto out; goto out;
} }
} }
} }
}
else if (pack_checksum) else if (pack_checksum)
{ {
if (!ostree_repo_map_pack_file (self, pack_checksum, FALSE, if (!ostree_repo_map_pack_file (self, pack_checksum, FALSE,