]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Create temporary manifest files in the directory they will end up in
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 6 Jan 2010 13:53:29 +0000 (14:53 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 6 Jan 2010 21:23:10 +0000 (22:23 +0100)
See also commit 106566bb638d112826fafa1661259258ac6ac1f7.

manifest.c

index 31f5b6be474c5945cd3895b555addb36850fd1ad..b25ab5af7adb98f969234daf5860ef1f7dcce6c8 100644 (file)
@@ -31,8 +31,6 @@
 #include "murmurhashneutral2.h"
 #include "comments.h"
 
-extern char *temp_dir;
-
 /*
  * Sketchy specification of the manifest disk format:
  *
@@ -608,7 +606,7 @@ int manifest_put(const char *manifest_path, struct file_hash *object_hash,
                }
        }
 
-       x_asprintf(&tmp_file, "%s/manifest.tmp.%s", temp_dir, tmp_string());
+       x_asprintf(&tmp_file, "%s.tmp.%s", manifest_path, tmp_string());
        fd2 = safe_open(tmp_file);
        if (fd2 == -1) {
                cc_log("Failed to open %s\n", tmp_file);