diff --git a/code/qcommon/files.c b/code/qcommon/files.c index 3256b449..f6d8e3df 100644 --- a/code/qcommon/files.c +++ b/code/qcommon/files.c @@ -943,6 +943,8 @@ fileHandle_t FS_FCreateOpenPipeFile( const char *filename ) { } else { + Com_Printf( S_COLOR_YELLOW "WARNING: Could not create new com_pipefile at %s. " + "com_pipefile will not be used.\n", ospath ); f = 0; } diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index af9d59a2..a6b1931a 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -254,9 +254,14 @@ Sys_Mkfifo */ FILE *Sys_Mkfifo( const char *ospath ) { - FILE *fifo; - int result; - int fn; + FILE *fifo; + int result; + int fn; + struct stat buf; + + // if file already exists AND is a pipefile, remove it + if( !stat( ospath, &buf ) && S_ISFIFO( buf.st_mode ) ) + FS_Remove( ospath ); result = mkfifo( ospath, 0600 ); if( result != 0 )