mirror of
https://github.com/bearstonem/openmohaa-vr.git
synced 2026-10-27 12:07:22 +01:00
Reduce duplication in FS path search code
Co-authored-by: smallmodel <15067410+smallmodel@users.noreply.github.com>
This commit is contained in:
1 parent
eb6b6173ee
commit
e299031470
12 files changed
+347
-383
No files matched your search
@@ -609,7 +609,7 @@ static void SV_RehashBans_f(void)
|
||||
|
||||
Com_sprintf(filepath, sizeof(filepath), "%s/%s", FS_GetCurrentGameDir(), sv_banFile->string);
|
||||
|
||||
if((filelen = FS_SV_FOpenFileRead(filepath, &readfrom)) >= 0)
|
||||
if((filelen = FS_BaseDir_FOpenFileRead(filepath, &readfrom)) >= 0)
|
||||
{
|
||||
if(filelen < 2)
|
||||
{
|
||||
@@ -705,7 +705,7 @@ static void SV_WriteBans(void)
|
||||
|
||||
Com_sprintf(filepath, sizeof(filepath), "%s/%s", FS_GetCurrentGameDir(), sv_banFile->string);
|
||||
|
||||
if((writeto = FS_SV_FOpenFileWrite(filepath)))
|
||||
if((writeto = FS_BaseDir_FOpenFileWrite(filepath)))
|
||||
{
|
||||
char writebuf[128 + MAX_REASON_LENGTH];
|
||||
serverBan_t *curban;
|
||||
|
||||
@@ -1088,7 +1088,7 @@ int SV_WriteDownloadToClient(client_t *cl, msg_t *msg)
|
||||
if ( !(sv_allowDownload->integer & DLF_ENABLE) ||
|
||||
(sv_allowDownload->integer & DLF_NO_UDP) ||
|
||||
idPack || unreferenced ||
|
||||
( cl->downloadSize = FS_SV_FOpenFileRead( cl->downloadName, &cl->download ) ) < 0 ) {
|
||||
( cl->downloadSize = FS_BaseDir_FOpenFileRead( cl->downloadName, &cl->download ) ) < 0 ) {
|
||||
// cannot auto-download file
|
||||
if(unreferenced)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user