diff options
-rw-r--r-- | src/util/disk_cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 79ec63080ca..36b27d95ede 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -843,8 +843,10 @@ cache_put(void *job, int thread_index) * (to ensure the size accounting of the cache doesn't get off). */ fd_final = open(filename, O_RDONLY | O_CLOEXEC); - if (fd_final != -1) + if (fd_final != -1) { + unlink(filename_tmp); goto done; + } /* OK, we're now on the hook to write out a file that we know is * not in the cache, and is also not being written out to the cache |