]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Check and log failure after create_parent_dirs()
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 3 Apr 2011 13:07:00 +0000 (15:07 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 3 Apr 2011 13:07:00 +0000 (15:07 +0200)
ccache.c

index 01178630362bbd1baaf2d6bbae155deda86619ec..ea123b9747a321e58dfb9df0f1bdc81466491480 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -551,7 +551,11 @@ to_cache(struct args *args)
        size_t added_bytes = 0;
        unsigned added_files = 0;
 
-       create_parent_dirs(cached_obj);
+       if (create_parent_dirs(cached_obj) != 0) {
+               cc_log("Failed to create parent directories for %s: %s",
+                      cached_obj, strerror(errno));
+               failed();
+       }
        tmp_stdout = format("%s.tmp.stdout.%s", cached_obj, tmp_string());
        tmp_stderr = format("%s.tmp.stderr.%s", cached_obj, tmp_string());
        tmp_obj = format("%s.tmp.%s", cached_obj, tmp_string());