Add installation path check (#314)

This commit is contained in:
pizzaboxer 2023-06-26 21:50:47 +01:00
parent 670790a023
commit 09d20ac427
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8

View File

@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
@ -65,11 +66,15 @@ namespace Bloxstrap.UI.Menu.ViewModels
{
using var dialog = new FolderBrowserDialog();
if (dialog.ShowDialog() == DialogResult.OK)
{
if (dialog.ShowDialog() != DialogResult.OK)
return;
if (!dialog.SelectedPath.EndsWith(App.ProjectName))
InstallLocation = Path.Combine(dialog.SelectedPath, App.ProjectName);
else
InstallLocation = dialog.SelectedPath;
OnPropertyChanged(nameof(InstallLocation));
}
OnPropertyChanged(nameof(InstallLocation));
}
private void OpenFolder()