[ostree] core: Improve error message if we hit an unreadable file



commit 0660d9e5cf43c12903558c39c90fd43c8ffb7740
Author: Colin Walters <walters verbum org>
Date:   Wed May 2 10:21:41 2012 -0400

    core: Improve error message if we hit an unreadable file

 src/libostree/ostree-repo.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-repo.c b/src/libostree/ostree-repo.c
index 447f53d..948ef91 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -3565,7 +3565,10 @@ ostree_repo_load_file (OstreeRepo         *self,
             {
               ret_input = (GInputStream*) g_file_read (loose_path, cancellable, error);
               if (!ret_input)
-                goto out;
+                {
+                  g_prefix_error (error, "Error opening loose file object %s: ", ot_gfile_get_path_cached (loose_path));
+                  goto out;
+                }
             }
         }
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]