File tree Expand file tree Collapse file tree 2 files changed +30
-7
lines changed
Wox.Plugin/SharedCommands Expand file tree Collapse file tree 2 files changed +30
-7
lines changed Original file line number Diff line number Diff line change @@ -163,22 +163,27 @@ public void PreStartCleanUpAfterPortabilityUpdate()
163
163
164
164
if ( DataLocationRoamingDeleteRequired )
165
165
{
166
- if ( roamingDataPath . LocationExists ( ) )
167
- MessageBox . Show ( "Wox detected you restarted after enabling portable mode, " +
168
- "your roaming data profile will now be deleted" ) ;
169
-
170
166
FilesFolders . RemoveFolderIfExists ( roamingDataPath ) ;
171
167
168
+ if ( MessageBox . Show ( "Wox has detected you enabled portable mode, " +
169
+ "would you like to move it to a different location?" , string . Empty ,
170
+ MessageBoxButton . YesNo ) == MessageBoxResult . Yes )
171
+ {
172
+ FilesFolders . OpenLocationInExporer ( Constant . RootDirectory ) ;
173
+
174
+ Environment . Exit ( 0 ) ;
175
+ }
176
+
172
177
return ;
173
178
}
174
179
175
180
if ( DataLocationPortableDeleteRequired )
176
181
{
177
- MessageBox . Show ( "Wox detected you restarted after disabling portable mode, " +
178
- "your portable data profile will now be deleted" ) ;
179
-
180
182
FilesFolders . RemoveFolderIfExists ( portableDataPath ) ;
181
183
184
+ MessageBox . Show ( "Wox has detected you disabled portable mode, " +
185
+ "the relevant shortcuts and uninstaller entry have been created" ) ;
186
+
182
187
return ;
183
188
}
184
189
}
Original file line number Diff line number Diff line change 1
1
using System ;
2
+ using System . Diagnostics ;
2
3
using System . IO ;
3
4
using System . Windows ;
4
5
@@ -107,5 +108,22 @@ public static bool FileExits(this string filePath)
107
108
{
108
109
return File . Exists ( filePath ) ;
109
110
}
111
+
112
+ public static void OpenLocationInExporer ( string location )
113
+ {
114
+ try
115
+ {
116
+ if ( LocationExists ( location ) )
117
+ Process . Start ( location ) ;
118
+ }
119
+ catch ( Exception e )
120
+ {
121
+ #if DEBUG
122
+ throw e ;
123
+ #else
124
+ MessageBox . Show ( string . Format ( "Unable to open location {0}, please check if it exists" , location ) ) ;
125
+ #endif
126
+ }
127
+ }
110
128
}
111
129
}
You can’t perform that action at this time.
0 commit comments