Commit dc970b94 authored by Sam Lantinga's avatar Sam Lantinga

*** empty log message ***

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40551
parent 8a1e3bca
...@@ -144,20 +144,24 @@ static void __cdecl cleanup_output(void) ...@@ -144,20 +144,24 @@ static void __cdecl cleanup_output(void)
#ifndef NO_STDIO_REDIRECT #ifndef NO_STDIO_REDIRECT
/* See if the files have any output in them */ /* See if the files have any output in them */
file = fopen(stdoutPath, "rb"); if ( stdoutPath[0] ) {
if ( file ) { file = fopen(stdoutPath, "rb");
empty = (fgetc(file) == EOF) ? 1 : 0; if ( file ) {
fclose(file); empty = (fgetc(file) == EOF) ? 1 : 0;
if ( empty ) { fclose(file);
remove(stdoutPath); if ( empty ) {
remove(stdoutPath);
}
} }
} }
file = fopen(stderrPath, "rb"); if ( stderrPath[0] ) {
if ( file ) { file = fopen(stderrPath, "rb");
empty = (fgetc(file) == EOF) ? 1 : 0; if ( file ) {
fclose(file); empty = (fgetc(file) == EOF) ? 1 : 0;
if ( empty ) { fclose(file);
remove(stderrPath); if ( empty ) {
remove(stderrPath);
}
} }
} }
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment