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
|
||||
|
||||
char childpath[256];
|
||||
Q_snprintfz(childpath, sizeof(childpath), "%s*", filename);
|
||||
Sys_EnumerateFiles(sp->rootpath, childpath, FSSTDIO_RebuildFSHash, data, spath);
|
||||
if (!Q_snprintfz(childpath, sizeof(childpath), "%s*", filename))
|
||||
Sys_EnumerateFiles(sp->rootpath, childpath, FSSTDIO_RebuildFSHash, data, spath);
|
||||
return true;
|
||||
}
|
||||
AddFileHash(sp->depth, filename, NULL, sp);
|
||||
|
@ -427,9 +427,9 @@ static qboolean QDECL FSSTDIO_RenameFile(searchpathfuncs_t *handle, const char
|
|||
char newsyspath[MAX_OSPATH];
|
||||
if (fs_readonly)
|
||||
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
|
||||
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 Sys_Rename(oldsyspath, newsyspath);
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ static qboolean QDECL FSSTDIO_RemoveFile(searchpathfuncs_t *handle, const char *
|
|||
char syspath[MAX_OSPATH];
|
||||
if (fs_readonly)
|
||||
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
|
||||
if (*filename && filename[strlen(filename)-1] == '/')
|
||||
return Sys_rmdir(syspath);
|
||||
|
|
Loading…
Reference in a new issue