mirror of
https://github.com/stuff-by-3-random-dudes/UWUVCI-AIO-WPF
synced 2024-11-10 05:34:13 +00:00
Selecting "Open Folder" will no longer return with an error message
This commit is contained in:
parent
a07c74e04c
commit
6baea082df
1 changed files with 12 additions and 3 deletions
|
@ -110,15 +110,24 @@ namespace UWUVCI_AIO_WPF.UI.Windows
|
|||
|
||||
private void Folder_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var filePath = "";
|
||||
try
|
||||
{
|
||||
if (File.Exists(path)) path = new FileInfo(path).DirectoryName;
|
||||
Process.Start(path);
|
||||
filePath = path;
|
||||
if (File.Exists(filePath))
|
||||
filePath = new FileInfo(filePath).DirectoryName;
|
||||
|
||||
Process.Start(new ProcessStartInfo()
|
||||
{
|
||||
FileName = filePath,
|
||||
UseShellExecute = true,
|
||||
Verb = "open"
|
||||
});
|
||||
Close();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
Custom_Message cm = new Custom_Message("An Error occured", "An error occured opening the folder. Please make sure the Output Path exists.");
|
||||
Custom_Message cm = new Custom_Message("An Error occured", "An error occured opening the folder. Please make sure the Output Path exists.\n\nFile path: " + filePath);
|
||||
try
|
||||
{
|
||||
cm.Owner = (FindResource("mvm") as MainViewModel).mw;
|
||||
|
|
Loading…
Reference in a new issue