*** empty log message ***

This commit is contained in:
Sam Lantinga 2002-12-02 01:10:20 +00:00
parent 0c25ddcb03
commit 918f1dc76c

View File

@ -144,20 +144,24 @@ static void __cdecl cleanup_output(void)
#ifndef NO_STDIO_REDIRECT
/* See if the files have any output in them */
file = fopen(stdoutPath, "rb");
if ( file ) {
empty = (fgetc(file) == EOF) ? 1 : 0;
fclose(file);
if ( empty ) {
remove(stdoutPath);
if ( stdoutPath[0] ) {
file = fopen(stdoutPath, "rb");
if ( file ) {
empty = (fgetc(file) == EOF) ? 1 : 0;
fclose(file);
if ( empty ) {
remove(stdoutPath);
}
}
}
file = fopen(stderrPath, "rb");
if ( file ) {
empty = (fgetc(file) == EOF) ? 1 : 0;
fclose(file);
if ( empty ) {
remove(stderrPath);
if ( stderrPath[0] ) {
file = fopen(stderrPath, "rb");
if ( file ) {
empty = (fgetc(file) == EOF) ? 1 : 0;
fclose(file);
if ( empty ) {
remove(stderrPath);
}
}
}
#endif