when saving a Profile, always make a Screenshots directory
This commit is contained in:
@@ -687,17 +687,9 @@ bool Profile::SaveAllToDir( CString sDir, bool bSignData ) const
|
|||||||
|
|
||||||
SaveStatsWebPageToDir( sDir );
|
SaveStatsWebPageToDir( sDir );
|
||||||
|
|
||||||
//
|
// Empty directories if none exist.
|
||||||
// create edits dir
|
FILEMAN->CreateDir( sDir + EDITS_SUBDIR );
|
||||||
//
|
FILEMAN->CreateDir( sDir + SCREENSHOTS_SUBDIR );
|
||||||
CString sEditsTempFile = sDir + EDITS_SUBDIR + "temp";
|
|
||||||
RageFile f;
|
|
||||||
f.Open( sDir + EDITS_SUBDIR + "temp", RageFile::WRITE );
|
|
||||||
f.Close();
|
|
||||||
|
|
||||||
FILEMAN->FlushDirCache( sDir + EDITS_SUBDIR );
|
|
||||||
|
|
||||||
FILEMAN->Remove( sEditsTempFile );
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -288,6 +288,16 @@ bool RageFileManager::Remove( CString sPath )
|
|||||||
return Deleted;
|
return Deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RageFileManager::CreateDir( CString sDir )
|
||||||
|
{
|
||||||
|
CString sTempFile = sDir + "temp";
|
||||||
|
RageFile f;
|
||||||
|
f.Open( sTempFile, RageFile::WRITE );
|
||||||
|
f.Close();
|
||||||
|
|
||||||
|
FILEMAN->Remove( sTempFile );
|
||||||
|
|
||||||
|
}
|
||||||
void RageFileManager::Mount( CString Type, CString Root, CString MountPoint )
|
void RageFileManager::Mount( CString Type, CString Root, CString MountPoint )
|
||||||
{
|
{
|
||||||
LockMut( *g_Mutex );
|
LockMut( *g_Mutex );
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public:
|
|||||||
|
|
||||||
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo );
|
void GetDirListing( CString sPath, CStringArray &AddTo, bool bOnlyDirs, bool bReturnPathToo );
|
||||||
bool Remove( CString sPath );
|
bool Remove( CString sPath );
|
||||||
|
void CreateDir( CString sDir );
|
||||||
|
|
||||||
enum FileType { TYPE_FILE, TYPE_DIR, TYPE_NONE };
|
enum FileType { TYPE_FILE, TYPE_DIR, TYPE_NONE };
|
||||||
FileType GetFileType( CString sPath );
|
FileType GetFileType( CString sPath );
|
||||||
|
|||||||
Reference in New Issue
Block a user