]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
cope with -o /dev/null
authorAndrew Tridgell <tridge@samba.org>
Sun, 31 Mar 2002 02:57:44 +0000 (04:57 +0200)
committerAndrew Tridgell <tridge@samba.org>
Sun, 31 Mar 2002 02:57:44 +0000 (04:57 +0200)
ccache.c

index 3a2767b5665282860318a2b323f91eead2b68e65..265aa0c1082fe7582be5249f744d7384d5133f44 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -538,6 +538,13 @@ static void process_args(int argc, char **argv)
                       output_file, input_file);
 #endif
        }
+
+       /* cope with -o /dev/null */
+       if (stat(output_file, &st) == 0 && !S_ISREG(st.st_mode)) {
+               cc_log("Not a regular file %s\n", output_file);
+               stats_update(STATS_ARGS);
+               failed();
+       }
 }
 
 /* the main ccache driver function */