]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Print temp file name in debug message
authorWilson Snyder <wsnyder@wsnyder.org>
Fri, 17 Sep 2010 20:27:52 +0000 (22:27 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Fri, 17 Sep 2010 20:27:52 +0000 (22:27 +0200)
util.c

diff --git a/util.c b/util.c
index 49173283643c4a4fce907fb91d21145135fd3761..39cf7ccd3f02c092605fedfe6c4a242779f8ee4d 100644 (file)
--- a/util.c
+++ b/util.c
@@ -187,8 +187,9 @@ copy_file(const char *src, const char *dest, int compress_dest)
        struct stat st;
        int errnum;
 
-       cc_log("Copying %s to %s (%s)",
-              src, dest, compress_dest ? "compressed": "uncompressed");
+       tmp_name = format("%s.%s.XXXXXX", dest, tmp_string());
+       cc_log("Copying %s to %s via %s (%s)",
+              src, dest, tmp_name, compress_dest ? "compressed": "uncompressed");
 
        /* open source file */
        fd_in = open(src, O_RDONLY | O_BINARY);
@@ -205,7 +206,6 @@ copy_file(const char *src, const char *dest, int compress_dest)
        }
 
        /* open destination file */
-       tmp_name = format("%s.%s.XXXXXX", dest, tmp_string());
        fd_out = mkstemp(tmp_name);
        if (fd_out == -1) {
                cc_log("mkstemp error: %s", strerror(errno));