]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove now superfluous test of empty result file
authorJoel Rosdahl <joel@rosdahl.net>
Thu, 6 Jun 2019 12:51:03 +0000 (14:51 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Thu, 6 Jun 2019 12:51:03 +0000 (14:51 +0200)
Empty files are detected as corrupted by result_get.

src/ccache.c

index 19d2b62022aa59672b1aa81917ff0b1438c17f47..249f1699dd6c0cc395ff0f2c8b081be68df1f7b7 100644 (file)
@@ -138,7 +138,7 @@ static char *arch_args[MAX_ARCH_ARGS] = {NULL};
 // object code.
 static struct file_hash *cached_obj_hash;
 
-// Full path to the file containing everything
+// Full path to the file containing the result
 // (cachedir/a/b/cdef[...]-size.result).
 static char *cached_result;
 
@@ -2127,11 +2127,6 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest)
                cc_log("Cache file %s not in cache", cached_result);
                return;
        }
-       if (st.st_size == 0) {
-               cc_log("Invalid (empty) cache file %s in cache", cached_result);
-               x_unlink(cached_result);
-               return;
-       }
 
        MTR_BEGIN("cache", "from_cache");