mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-17 01:11:18 +00:00
grr.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@6012 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
b24c6ed9d9
commit
e598d136b9
1 changed files with 5 additions and 5 deletions
|
@ -277,8 +277,8 @@ static int QDECL FSSTDIO_RebuildFSHash(const char *filename, qofs_t filesize, ti
|
||||||
{ //this is actually a directory
|
{ //this is actually a directory
|
||||||
|
|
||||||
char childpath[256];
|
char childpath[256];
|
||||||
Q_snprintfz(childpath, sizeof(childpath), "%s*", filename);
|
if (!Q_snprintfz(childpath, sizeof(childpath), "%s*", filename))
|
||||||
Sys_EnumerateFiles(sp->rootpath, childpath, FSSTDIO_RebuildFSHash, data, spath);
|
Sys_EnumerateFiles(sp->rootpath, childpath, FSSTDIO_RebuildFSHash, data, spath);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
AddFileHash(sp->depth, filename, NULL, sp);
|
AddFileHash(sp->depth, filename, NULL, sp);
|
||||||
|
@ -427,9 +427,9 @@ static qboolean QDECL FSSTDIO_RenameFile(searchpathfuncs_t *handle, const char
|
||||||
char newsyspath[MAX_OSPATH];
|
char newsyspath[MAX_OSPATH];
|
||||||
if (fs_readonly)
|
if (fs_readonly)
|
||||||
return false;
|
return false;
|
||||||
if ((unsigned int)snprintf (oldsyspath, sizeof(oldsyspath), "%s/%s", sp->rootpath, oldname) > sizeof(oldsyspath)-1)
|
if (Q_snprintfz (oldsyspath, sizeof(oldsyspath), "%s/%s", sp->rootpath, oldname))
|
||||||
return false; //too long
|
return false; //too long
|
||||||
if ((unsigned int)snprintf (newsyspath, sizeof(newsyspath), "%s/%s", sp->rootpath, newname) > sizeof(newsyspath)-1)
|
if (Q_snprintfz (newsyspath, sizeof(newsyspath), "%s/%s", sp->rootpath, newname))
|
||||||
return false; //too long
|
return false; //too long
|
||||||
return Sys_Rename(oldsyspath, newsyspath);
|
return Sys_Rename(oldsyspath, newsyspath);
|
||||||
}
|
}
|
||||||
|
@ -439,7 +439,7 @@ static qboolean QDECL FSSTDIO_RemoveFile(searchpathfuncs_t *handle, const char *
|
||||||
char syspath[MAX_OSPATH];
|
char syspath[MAX_OSPATH];
|
||||||
if (fs_readonly)
|
if (fs_readonly)
|
||||||
return false;
|
return false;
|
||||||
if ((unsigned int)snprintf (syspath, sizeof(syspath), "%s/%s", sp->rootpath, filename) > sizeof(syspath)-1)
|
if (Q_snprintfz (syspath, sizeof(syspath), "%s/%s", sp->rootpath, filename))
|
||||||
return false; //too long
|
return false; //too long
|
||||||
if (*filename && filename[strlen(filename)-1] == '/')
|
if (*filename && filename[strlen(filename)-1] == '/')
|
||||||
return Sys_rmdir(syspath);
|
return Sys_rmdir(syspath);
|
||||||
|
|
Loading…
Reference in a new issue