cope with -o /dev/null

This commit is contained in:
Andrew Tridgell 2002-03-31 04:57:44 +02:00
parent a8dc53c89c
commit 2b3560fbea

View File

@ -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 */