mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge branch 'master' up to commit 657d342
This commit is contained in:
commit
ed5a846a64
2 changed files with 30 additions and 7 deletions
|
|
@ -161,22 +161,27 @@ namespace Wox.Core.Configuration
|
|||
|
||||
if (DataLocationRoamingDeleteRequired)
|
||||
{
|
||||
if(roamingDataPath.LocationExists())
|
||||
MessageBox.Show("Wox detected you restarted after enabling portable mode, " +
|
||||
"your roaming data profile will now be deleted");
|
||||
|
||||
FilesFolders.RemoveFolderIfExists(roamingDataPath);
|
||||
|
||||
if (MessageBox.Show("Wox has detected you enabled portable mode, " +
|
||||
"would you like to move it to a different location?", string.Empty,
|
||||
MessageBoxButton.YesNo) == MessageBoxResult.Yes)
|
||||
{
|
||||
FilesFolders.OpenLocationInExporer(Constant.RootDirectory);
|
||||
|
||||
Environment.Exit(0);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(DataLocationPortableDeleteRequired)
|
||||
{
|
||||
MessageBox.Show("Wox detected you restarted after disabling portable mode, " +
|
||||
"your portable data profile will now be deleted");
|
||||
|
||||
FilesFolders.RemoveFolderIfExists(portableDataPath);
|
||||
|
||||
MessageBox.Show("Wox has detected you disabled portable mode, " +
|
||||
"the relevant shortcuts and uninstaller entry have been created");
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Windows;
|
||||
|
||||
|
|
@ -107,5 +108,22 @@ namespace Wox.Plugin.SharedCommands
|
|||
{
|
||||
return File.Exists(filePath);
|
||||
}
|
||||
|
||||
public static void OpenLocationInExporer(string location)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (LocationExists(location))
|
||||
Process.Start(location);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
#if DEBUG
|
||||
throw e;
|
||||
#else
|
||||
MessageBox.Show(string.Format("Unable to open location {0}, please check if it exists", location));
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue