Fix folder creation

This commit is contained in:
def 2016-05-01 14:43:08 +02:00
parent ab13a0086d
commit 644a23ba57
2 changed files with 8 additions and 4 deletions

View file

@ -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);

View file

@ -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)