[ostree/wip/ostbuild-v2] core: Improve error message if we hit an unreadable file



commit 17a8fd04f4b9a5fc1e18edd40ff69b36863813cd
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 bfba325..6b47bf3 100644
--- a/src/libostree/ostree-repo.c
+++ b/src/libostree/ostree-repo.c
@@ -3270,7 +3270,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]