]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
update the time on the stderr as well as the main hash file
authorAndrew Tridgell <tridge@samba.org>
Thu, 28 Mar 2002 04:22:40 +0000 (05:22 +0100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 28 Mar 2002 04:22:40 +0000 (05:22 +0100)
ccache.c

index 35333a741910e7b789a5c258f8395cc4d6b3b433..8946da8e33f8e5b1706a59bc344584733fea1718 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -251,16 +251,18 @@ static void find_hash(ARGS *args)
 static void from_cache(int first)
 {
        int fd_stderr;
-       char *s;
+       char *stderr_file;
        int ret;
 
-       x_asprintf(&s, "%s.stderr", hashname);
-       fd_stderr = open(s, O_RDONLY);
-       free(s);
+       x_asprintf(&stderr_file, "%s.stderr", hashname);
+       fd_stderr = open(stderr_file, O_RDONLY);
        if (fd_stderr == -1) {
                /* it isn't in cache ... */
+               free(stderr_file);
                return;
        }
+       utime(stderr_file, NULL);
+       free(stderr_file);
 
        unlink(output_file);
        ret = link(hashname, output_file);