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 @@ -161,22 +161,27 @@ public void PreStartCleanUpAfterPortabilityUpdate()
161
161
162
162
if ( DataLocationRoamingDeleteRequired )
163
163
{
164
- if ( roamingDataPath . LocationExists ( ) )
165
- MessageBox . Show ( "Wox detected you restarted after enabling portable mode, " +
166
- "your roaming data profile will now be deleted" ) ;
167
-
168
164
FilesFolders . RemoveFolderIfExists ( roamingDataPath ) ;
169
165
166
+ if ( MessageBox . Show ( "Wox has detected you enabled portable mode, " +
167
+ "would you like to move it to a different location?" , string . Empty ,
168
+ MessageBoxButton . YesNo ) == MessageBoxResult . Yes )
169
+ {
170
+ FilesFolders . OpenLocationInExporer ( Constant . RootDirectory ) ;
171
+
172
+ Environment . Exit ( 0 ) ;
173
+ }
174
+
170
175
return ;
171
176
}
172
177
173
178
if ( DataLocationPortableDeleteRequired )
174
179
{
175
- MessageBox . Show ( "Wox detected you restarted after disabling portable mode, " +
176
- "your portable data profile will now be deleted" ) ;
177
-
178
180
FilesFolders . RemoveFolderIfExists ( portableDataPath ) ;
179
181
182
+ MessageBox . Show ( "Wox has detected you disabled portable mode, " +
183
+ "the relevant shortcuts and uninstaller entry have been created" ) ;
184
+
180
185
return ;
181
186
}
182
187
}
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