Moving some folders around in the windows file system.

This commit is contained in:
Henrik Andersson
2011-06-03 22:31:18 +02:00
parent d442512ade
commit 07b4697112
3 changed files with 25 additions and 2 deletions
+7 -2
View File
@@ -55,16 +55,21 @@ static RString GetMountDir( const RString &sDirOfExecutable )
void ArchHooks::MountInitialFilesystems( const RString &sDirOfExecutable ) void ArchHooks::MountInitialFilesystems( const RString &sDirOfExecutable )
{ {
RString sDir = GetMountDir( sDirOfExecutable ); RString sDir = GetMountDir( sDirOfExecutable );
RString sCommonAppDataDir = SpecialDirs::GetCommonAppDataDir() + PRODUCT_ID;
FILEMAN->Mount( "dir", sDir, "/" ); FILEMAN->Mount( "dir", sDir, "/" );
FILEMAN->Mount( "dir", sCommonAppDataDir, "/" );
FILEMAN->Mount( "dir", sCommonAppDataDir + "/Cache", "/Cache" );
} }
void ArchHooks::MountUserFilesystems( const RString &sDirOfExecutable ) void ArchHooks::MountUserFilesystems( const RString &sDirOfExecutable )
{ {
RString sAppDataDir = SpecialDirs::GetAppDataDir() + PRODUCT_ID; RString sAppDataDir = SpecialDirs::GetAppDataDir() + PRODUCT_ID;
FILEMAN->Mount( "dir", sAppDataDir + "/Cache", "/Cache" ); RString sLocalAppDataDir = SpecialDirs::GetLocalAppDataDir() + PRODUCT_ID;
RString sPicturesDir = SpecialDirs::GetPicturesDir() + PRODUCT_ID;
FILEMAN->Mount( "dir", sAppDataDir + "/Logs", "/Logs" ); FILEMAN->Mount( "dir", sAppDataDir + "/Logs", "/Logs" );
FILEMAN->Mount( "dir", sAppDataDir + "/Save", "/Save" ); FILEMAN->Mount( "dir", sAppDataDir + "/Save", "/Save" );
FILEMAN->Mount( "dir", sAppDataDir + "/Screenshots", "/Screenshots" ); FILEMAN->Mount( "dir", sPicturesDir + "/Screenshots", "/Screenshots" );
FILEMAN->Mount( "dir", sAppDataDir + "/Packages", "/" + SpecialFiles::USER_PACKAGES_DIR ); FILEMAN->Mount( "dir", sAppDataDir + "/Packages", "/" + SpecialFiles::USER_PACKAGES_DIR );
} }
+15
View File
@@ -18,6 +18,21 @@ RString SpecialDirs::GetAppDataDir()
return GetSpecialFolderPath( CSIDL_APPDATA ); return GetSpecialFolderPath( CSIDL_APPDATA );
} }
RString SpecialDirs::GetLocalAppDataDir()
{
return GetSpecialFolderPath( CSIDL_LOCAL_APPDATA );
}
RString SpecialDirs::GetCommonAppDataDir()
{
return GetSpecialFolderPath( CSIDL_COMMON_APPDATA );
}
RString SpecialDirs::GetPicturesDir()
{
return GetSpecialFolderPath( CSIDL_MYPICTURES );
}
RString SpecialDirs::GetDesktopDir() RString SpecialDirs::GetDesktopDir()
{ {
return GetSpecialFolderPath( CSIDL_DESKTOP ); return GetSpecialFolderPath( CSIDL_DESKTOP );
+3
View File
@@ -4,6 +4,9 @@
namespace SpecialDirs namespace SpecialDirs
{ {
RString GetAppDataDir(); RString GetAppDataDir();
RString GetLocalAppDataDir();
RString GetCommonAppDataDir();
RString GetPicturesDir();
RString GetDesktopDir(); RString GetDesktopDir();
}; };