mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-10 14:42:13 +00:00
Bit more verbose. Also ensures that the location actually exists.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4311 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
292f61c6e0
commit
a141f45715
1 changed files with 19 additions and 16 deletions
|
@ -2152,6 +2152,21 @@ qboolean Update_GetHomeDirectory(char *homedir, int homedirsize)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void Update_CreatePath (char *path)
|
||||||
|
{
|
||||||
|
char *ofs;
|
||||||
|
|
||||||
|
for (ofs = path+1 ; *ofs ; ofs++)
|
||||||
|
{
|
||||||
|
if (*ofs == '/')
|
||||||
|
{ // create the directory
|
||||||
|
*ofs = 0;
|
||||||
|
Sys_mkdir (path);
|
||||||
|
*ofs = '/';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#include "fs.h"
|
#include "fs.h"
|
||||||
void Update_Version_Updated(struct dl_download *dl)
|
void Update_Version_Updated(struct dl_download *dl)
|
||||||
{
|
{
|
||||||
|
@ -2166,8 +2181,11 @@ void Update_Version_Updated(struct dl_download *dl)
|
||||||
vfsfile_t *pending;
|
vfsfile_t *pending;
|
||||||
Update_GetHomeDirectory(pendingname, sizeof(pendingname));
|
Update_GetHomeDirectory(pendingname, sizeof(pendingname));
|
||||||
Q_strncatz(pendingname, DISTRIBUTION BUILDTYPE EXETYPE".tmp", sizeof(pendingname));
|
Q_strncatz(pendingname, DISTRIBUTION BUILDTYPE EXETYPE".tmp", sizeof(pendingname));
|
||||||
|
Update_CreatePath(pendingname);
|
||||||
pending = VFSOS_Open(pendingname, "wb");
|
pending = VFSOS_Open(pendingname, "wb");
|
||||||
if (pending)
|
if (!pending)
|
||||||
|
Con_Printf("Unable to write to \"%s\"\n", pendingname);
|
||||||
|
else
|
||||||
{
|
{
|
||||||
while(1)
|
while(1)
|
||||||
{
|
{
|
||||||
|
@ -2226,21 +2244,6 @@ void Update_Check(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Update_CreatePath (char *path)
|
|
||||||
{
|
|
||||||
char *ofs;
|
|
||||||
|
|
||||||
for (ofs = path+1 ; *ofs ; ofs++)
|
|
||||||
{
|
|
||||||
if (*ofs == '/')
|
|
||||||
{ // create the directory
|
|
||||||
*ofs = 0;
|
|
||||||
Sys_mkdir (path);
|
|
||||||
*ofs = '/';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
qboolean Sys_CheckUpdated(void)
|
qboolean Sys_CheckUpdated(void)
|
||||||
{
|
{
|
||||||
int ffe = COM_CheckParm("--fromfrontend");
|
int ffe = COM_CheckParm("--fromfrontend");
|
||||||
|
|
Loading…
Reference in a new issue