mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-30 16:30:43 +00:00
work towards a more secure qfs
This commit is contained in:
parent
68d2167c9e
commit
851d203916
19 changed files with 193 additions and 167 deletions
|
@ -54,6 +54,7 @@ int fnmatch (const char *__pattern, const char *__string, int __flags);
|
|||
#endif
|
||||
|
||||
#include "QF/csqc.h"
|
||||
#include "QF/cvar.h"
|
||||
#include "QF/progs.h"
|
||||
#include "QF/quakefs.h"
|
||||
#include "QF/va.h"
|
||||
|
@ -158,7 +159,8 @@ bi_File_Open (progs_t *pr)
|
|||
goto error;
|
||||
if (do_write && !file_writeable (path))
|
||||
goto error;
|
||||
R_INT (pr) = QFile_open (pr, va ("%s/%s", qfs_gamedir_path, path), mode);
|
||||
R_INT (pr) = QFile_open (pr, va ("%s/%s/%s", fs_userpath->string,
|
||||
qfs_gamedir->dir.def, path), mode);
|
||||
free (path);
|
||||
return;
|
||||
error:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue