mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-25 13:32:01 +00:00
fix some problems with directories being created in the wrong places or not at all (caused by fs_userpath not being used when it should)
This commit is contained in:
parent
91a47e083c
commit
8ff75f94dc
3 changed files with 12 additions and 7 deletions
|
@ -1677,8 +1677,6 @@ void Host_Init (quakeparms_t *parms)
|
||||||
{
|
{
|
||||||
COM_InitArgv (parms->argc, parms->argv);
|
COM_InitArgv (parms->argc, parms->argv);
|
||||||
|
|
||||||
Sys_mkdir("qw");
|
|
||||||
|
|
||||||
if (COM_CheckParm ("-minmemory"))
|
if (COM_CheckParm ("-minmemory"))
|
||||||
parms->memsize = MINIMUM_MEMORY;
|
parms->memsize = MINIMUM_MEMORY;
|
||||||
|
|
||||||
|
|
|
@ -325,6 +325,7 @@ COM_CreatePath ( char *path )
|
||||||
*ofs = '/';
|
*ofs = '/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Sys_mkdir (path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -890,12 +891,18 @@ COM_InitFilesystem ( void )
|
||||||
/*
|
/*
|
||||||
start up with BASEGAME by default
|
start up with BASEGAME by default
|
||||||
*/
|
*/
|
||||||
|
COM_CreatePath (va("%s/%s",fs_userpath->string,BASEGAME));
|
||||||
COM_AddGameDirectory (BASEGAME);
|
COM_AddGameDirectory (BASEGAME);
|
||||||
if (hipnotic)
|
if (hipnotic) {
|
||||||
|
COM_CreatePath (va("%s/%s",fs_userpath->string,"hipnotic"));
|
||||||
COM_AddGameDirectory ("hipnotic");
|
COM_AddGameDirectory ("hipnotic");
|
||||||
if (rogue)
|
}
|
||||||
|
if (rogue) {
|
||||||
|
COM_CreatePath (va("%s/%s",fs_userpath->string,"rogue"));
|
||||||
COM_AddGameDirectory ("rogue");
|
COM_AddGameDirectory ("rogue");
|
||||||
|
}
|
||||||
|
|
||||||
|
COM_CreatePath (va("%s/qw",fs_userpath->string));
|
||||||
COM_AddGameDirectory ("qw");
|
COM_AddGameDirectory ("qw");
|
||||||
|
|
||||||
// any set gamedirs will be freed up to here
|
// any set gamedirs will be freed up to here
|
||||||
|
|
|
@ -780,15 +780,15 @@ void SV_Snap (int uid)
|
||||||
|
|
||||||
sprintf(pcxname, "%d-00.pcx", uid);
|
sprintf(pcxname, "%d-00.pcx", uid);
|
||||||
|
|
||||||
snprintf (checkname, sizeof(checkname), "%s/snap", gamedirfile);
|
snprintf (checkname, sizeof(checkname), "%s/snap", com_gamedir);
|
||||||
Sys_mkdir(gamedirfile);
|
Sys_mkdir(com_gamedir);
|
||||||
Sys_mkdir(checkname);
|
Sys_mkdir(checkname);
|
||||||
|
|
||||||
for (i=0 ; i<=99 ; i++)
|
for (i=0 ; i<=99 ; i++)
|
||||||
{
|
{
|
||||||
pcxname[strlen(pcxname) - 6] = i/10 + '0';
|
pcxname[strlen(pcxname) - 6] = i/10 + '0';
|
||||||
pcxname[strlen(pcxname) - 5] = i%10 + '0';
|
pcxname[strlen(pcxname) - 5] = i%10 + '0';
|
||||||
snprintf (checkname, sizeof(checkname), "%s/snap/%s", gamedirfile, pcxname);
|
snprintf (checkname, sizeof(checkname), "%s/snap/%s", com_gamedir, pcxname);
|
||||||
if (Sys_FileTime(checkname) == -1)
|
if (Sys_FileTime(checkname) == -1)
|
||||||
break; // file doesn't exist
|
break; // file doesn't exist
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue