X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=fs.c;h=157a9c7b7cd501c6c92634efd06187b6e363c984;hb=82a3d4bc9eaf276b248205567c254bea70c97a94;hp=2f00c1ea34ba7a5bddfea17ec6f3d8ef974376d4;hpb=a2445d85eccf4d0c5766f44f02cd04a600c4bad4;p=xonotic%2Fdarkplaces.git diff --git a/fs.c b/fs.c index 2f00c1ea..157a9c7b 100644 --- a/fs.c +++ b/fs.c @@ -1031,6 +1031,10 @@ void FS_Init (void) Cvar_SetQuick (&scr_screenshot_name, com_modname); } } + + // If "-condebug" is in the command line, remove the previous log file + if (COM_CheckParm ("-condebug") != 0) + unlink (va("%s/qconsole.log", fs_gamedir)); } @@ -1164,7 +1168,7 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet) if (!diff) { if (!quiet) - Sys_Printf("FS_FindFile: %s in %s\n", + Con_DPrintf("FS_FindFile: %s in %s\n", pak->files[middle].name, pak->filename); if (index != NULL) @@ -1186,7 +1190,7 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet) if (FS_SysFileExists (netpath)) { if (!quiet) - Sys_Printf("FS_FindFile: %s\n", netpath); + Con_DPrintf("FS_FindFile: %s\n", netpath); if (index != NULL) *index = -1; @@ -1196,7 +1200,7 @@ static searchpath_t *FS_FindFile (const char *name, int* index, qboolean quiet) } if (!quiet) - Sys_Printf("FS_FindFile: can't find %s\n", name); + Con_DPrintf("FS_FindFile: can't find %s\n", name); if (index != NULL) *index = -1; @@ -1627,7 +1631,11 @@ int FS_Seek (qfile_t* file, long offset, int whence) // Quick path for unpacked files if (! (file->flags & FS_FLAG_PACKED)) #ifdef FS_USESYSCALLS - return lseek (file->stream, offset, whence); + { + if (lseek (file->stream, offset, whence) == -1) + return -1; + return 0; + } #else return fseek (file->stream, offset, whence); #endif @@ -2106,7 +2114,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet) if (liststart == NULL) liststart = listcurrent; if (!quiet) - Sys_Printf("SearchPackFile: %s : %s\n", pak->filename, temp); + Con_DPrintf("SearchPackFile: %s : %s\n", pak->filename, temp); } } // strip off one path element at a time until empty @@ -2145,7 +2153,7 @@ fssearch_t *FS_Search(const char *pattern, int caseinsensitive, int quiet) if (liststart == NULL) liststart = listcurrent; if (!quiet) - Sys_Printf("SearchDirFile: %s\n", temp); + Con_DPrintf("SearchDirFile: %s\n", temp); } } }