Changed the demofile slot finder to use FS_FileExists instead of FS_ReadFile to find a free filename.

This commit is contained in:
Thilo Schulz 2006-07-30 14:42:15 +00:00
parent 9fd1a47819
commit 3afbcc9854

View file

@ -298,10 +298,8 @@ void CL_Record_f( void ) {
CL_DemoFilename( number, demoName ); CL_DemoFilename( number, demoName );
Com_sprintf (name, sizeof(name), "demos/%s.dm_%d", demoName, PROTOCOL_VERSION ); Com_sprintf (name, sizeof(name), "demos/%s.dm_%d", demoName, PROTOCOL_VERSION );
len = FS_ReadFile( name, NULL ); if (!FS_FileExists(name))
if ( len <= 0 ) {
break; // file doesn't exist break; // file doesn't exist
}
} }
} }