mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix folder creation
This commit is contained in:
parent
ab13a0086d
commit
644a23ba57
|
@ -80,9 +80,6 @@ void CUpdater::MoveFile(const char *pFile)
|
|||
char aBuf[256];
|
||||
size_t len = str_length(pFile);
|
||||
|
||||
if(fs_makedir_rec_for(pFile) < 0)
|
||||
dbg_msg("updater", "I/O Error couldnt create folder for: %s", pFile);
|
||||
|
||||
if(!str_comp_nocase(pFile + len - 4, ".dll") || !str_comp_nocase(pFile + len - 4, ".ttf"))
|
||||
{
|
||||
str_format(aBuf, sizeof(aBuf), "%s.old", pFile);
|
||||
|
|
|
@ -408,7 +408,14 @@ public:
|
|||
{
|
||||
char aOldBuffer[MAX_PATH_LENGTH];
|
||||
char aNewBuffer[MAX_PATH_LENGTH];
|
||||
return !fs_rename(GetBinaryPath(pOldFilename, aOldBuffer, sizeof(aOldBuffer)), GetBinaryPath(pNewFilename, aNewBuffer, sizeof (aNewBuffer)));
|
||||
|
||||
GetBinaryPath(pOldFilename, aOldBuffer, sizeof(aOldBuffer));
|
||||
GetBinaryPath(pNewFilename, aNewBuffer, sizeof(aNewBuffer));
|
||||
|
||||
if(fs_makedir_rec_for(aNewBuffer) < 0)
|
||||
dbg_msg("storage", "I/O Error couldnt create folder for: %s", aNewBuffer);
|
||||
|
||||
return !fs_rename(aOldBuffer, aNewBuffer);
|
||||
}
|
||||
|
||||
virtual bool CreateFolder(const char *pFoldername, int Type)
|
||||
|
|
Loading…
Reference in a new issue