@@ -47,10 +47,7 @@ public void DisablePortableMode()
47
47
}
48
48
catch ( Exception e )
49
49
{
50
- #if ! DEBUG
51
- Log . Exception ( "Portable" , "Error occured while disabling portable mode" , e ) ;
52
- #endif
53
- throw ;
50
+ Log . Exception ( "|Portable.DisablePortableMode|Error occured while disabling portable mode" , e ) ;
54
51
}
55
52
}
56
53
@@ -74,10 +71,7 @@ public void EnablePortableMode()
74
71
}
75
72
catch ( Exception e )
76
73
{
77
- #if ! DEBUG
78
- Log . Exception ( "Portable" , "Error occured while enabling portable mode" , e ) ;
79
- #endif
80
- throw ;
74
+ Log . Exception ( "|Portable.EnablePortableMode|Error occured while enabling portable mode" , e ) ;
81
75
}
82
76
}
83
77
@@ -159,7 +153,8 @@ public void PreStartCleanUpAfterPortabilityUpdate()
159
153
var portableDataDeleteFilePath = Path . Combine ( portableDataDir , DataLocation . DeletionIndicatorFile ) ;
160
154
var roamingDataDeleteFilePath = Path . Combine ( roamingDataDir , DataLocation . DeletionIndicatorFile ) ;
161
155
162
- // Should we switch from %AppData% to portable mode?
156
+ // If the data folder in %appdata% is marked for deletion,
157
+ // delete it and prompt the user to pick the portable data location
163
158
if ( File . Exists ( roamingDataDeleteFilePath ) )
164
159
{
165
160
FilesFolders . RemoveFolderIfExists ( roamingDataDir ) ;
@@ -173,7 +168,8 @@ public void PreStartCleanUpAfterPortabilityUpdate()
173
168
Environment . Exit ( 0 ) ;
174
169
}
175
170
}
176
- // Should we switch from portable mode to %AppData%?
171
+ // Otherwise, if the portable data folder is marked for deletion,
172
+ // delete it and notify the user about it.
177
173
else if ( File . Exists ( portableDataDeleteFilePath ) )
178
174
{
179
175
FilesFolders . RemoveFolderIfExists ( portableDataDir ) ;
0 commit comments