@@ -19,11 +19,8 @@ public static void EnsureRootDirectory()
1919 if ( ! Directory . Exists ( ProfileRootDirectory ) )
2020 {
2121 Directory . CreateDirectory ( ProfileRootDirectory ) ;
22- }
23- else
24- {
2522 MoveLegacyCache ( ) ;
26- }
23+ }
2724 }
2825 private static void MoveLegacyCache ( )
2926 {
@@ -33,21 +30,30 @@ private static void MoveLegacyCache()
3330 string config = Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) , "GameVault" , "config" ) ;
3431 string themes = Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) , "GameVault" , "themes" ) ;
3532 string legacyDir = Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . ApplicationData ) , "GameVault" , "legacy" , "1.16.1.0" ) ;
33+
34+ Directory . CreateDirectory ( legacyDir ) ;
35+
3636 if ( Directory . Exists ( cache ) )
3737 {
38- Directory . Move ( cache , legacyDir ) ;
38+ string cacheDestination = Path . Combine ( legacyDir , "cache" ) ;
39+ Directory . Move ( cache , cacheDestination ) ;
3940 }
41+
4042 if ( Directory . Exists ( config ) )
4143 {
42- Directory . Move ( config , legacyDir ) ;
44+ string configDestination = Path . Combine ( legacyDir , "config" ) ;
45+ Directory . Move ( config , configDestination ) ;
4346 }
47+
4448 if ( Directory . Exists ( themes ) )
4549 {
46- Directory . Move ( themes , legacyDir ) ;
50+ string themesDestination = Path . Combine ( legacyDir , "themes" ) ;
51+ Directory . Move ( themes , themesDestination ) ;
4752 }
4853 }
4954 catch { }
5055 }
56+
5157 public static UserProfile CreateUserProfile ( string serverUrl )
5258 {
5359 string serverRootDirectory = Path . Combine ( ProfileRootDirectory , serverUrl ) ;
0 commit comments