mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 14:52:08 +00:00
Always use COM_CreatPath instead of Sys_mkdir
This commit is contained in:
parent
631d5f470c
commit
d31a9f73de
3 changed files with 3 additions and 16 deletions
|
@ -1111,8 +1111,6 @@ CL_Download_f
|
|||
*/
|
||||
void CL_Download_f (void)
|
||||
{
|
||||
char *p, *q;
|
||||
|
||||
if (cls.state == ca_disconnected)
|
||||
{
|
||||
Con_Printf ("Must be connected.\n");
|
||||
|
@ -1127,16 +1125,7 @@ void CL_Download_f (void)
|
|||
|
||||
snprintf (cls.downloadname, sizeof(cls.downloadname), "%s/%s", com_gamedir, Cmd_Argv(1));
|
||||
|
||||
p = cls.downloadname;
|
||||
for (;;) {
|
||||
if ((q = strchr(p, '/')) != NULL) {
|
||||
*q = 0;
|
||||
Sys_mkdir(cls.downloadname);
|
||||
*q = '/';
|
||||
p = q + 1;
|
||||
} else
|
||||
break;
|
||||
}
|
||||
COM_CreatePath (cls.downloadname);
|
||||
|
||||
strncpy (cls.downloadtempname, cls.downloadname, sizeof(cls.downloadtempname));
|
||||
cls.download = Qopen (cls.downloadname, "wb");
|
||||
|
|
|
@ -777,8 +777,7 @@ void SV_Snap (int uid)
|
|||
sprintf(pcxname, "%d-00.pcx", uid);
|
||||
|
||||
snprintf (checkname, sizeof(checkname), "%s/snap", com_gamedir);
|
||||
Sys_mkdir(com_gamedir);
|
||||
Sys_mkdir(checkname);
|
||||
COM_CreatePath (va ("%s/dummy", checkname));
|
||||
|
||||
for (i=0 ; i<=99 ; i++)
|
||||
{
|
||||
|
|
|
@ -767,9 +767,8 @@ VID_SetPalette (unsigned char *palette)
|
|||
}
|
||||
d_15to8table[i]=k;
|
||||
}
|
||||
snprintf(s, sizeof(s), "%s/glquake", com_gamedir);
|
||||
Sys_mkdir (s);
|
||||
snprintf(s, sizeof(s), "%s/glquake/15to8.pal", com_gamedir);
|
||||
COM_CreatePath (s);
|
||||
if ((f = Qopen(s, "wb")) != NULL) {
|
||||
Qwrite(f, d_15to8table, 1<<15);
|
||||
Qclose(f);
|
||||
|
|
Loading…
Reference in a new issue