diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2010-07-15 14:30:32 -0300 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2010-07-16 15:42:51 +0200 |
commit | aebc480793d00a41f672606cecb9ab1f2fd4331b (patch) | |
tree | 364c72a51424fe19054242fe0cab98104bb9809b /manifest.c | |
parent | ce58d8ac8be5ee5ef0e270b75a2a3191131de3c5 (diff) | |
download | ccache-aebc480793d00a41f672606cecb9ab1f2fd4331b.tar.gz |
Unlink destination file before renames
Windows' rename() will not overwrite existing files.
Diffstat (limited to 'manifest.c')
-rw-r--r-- | manifest.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -673,6 +673,7 @@ int manifest_put(const char *manifest_path, struct file_hash *object_hash, add_object_entry(mf, object_hash, included_files); if (write_manifest(f2, mf)) { + unlink(manifest_path); if (rename(tmp_file, manifest_path) == 0) { ret = 1; } else { |