]> git.ipfire.org Git - thirdparty/ccache.git/commit
Copy directly from cache to destination file instead of via tmp file
authorJoel Rosdahl <joel@rosdahl.net>
Fri, 22 May 2020 19:16:48 +0000 (21:16 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 22 May 2020 19:16:48 +0000 (21:16 +0200)
commita16778a6243e271d501da95232cbe7c9ff58649b
treea1a6b494c8ddc9f6d3abe8c842c38b0364996558
parent94e3110f02bfe9a6b1b6c9c235d7a15eddf944af
Copy directly from cache to destination file instead of via tmp file

ccache copies files to the cache via a temporary file which is then
renamed into place. For simplicity reasons the same file copy function
is used when copying files from the cache as well. This however makes
ccache fail for very long destination filenames.

Fix this by introducing a “via_tmp_file” parameter to copy_file, similar
to how it works on master.

Closes #593.
src/ccache.c
src/ccache.h
src/util.c