diff --git a/PROMS/VEPROMS User Interface/frmVEPROMS.cs b/PROMS/VEPROMS User Interface/frmVEPROMS.cs index 0c556aee..05955591 100644 --- a/PROMS/VEPROMS User Interface/frmVEPROMS.cs +++ b/PROMS/VEPROMS User Interface/frmVEPROMS.cs @@ -1955,12 +1955,17 @@ namespace VEPROMS { string tmp = Properties.Settings.Default.FormatPath; DirectoryInfo di = null; - if (tmp != null && tmp !="") di = new DirectoryInfo(Properties.Settings.Default.FormatPath); - if (((tmp ?? "") == "") || (di != null && (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall")))) + //if (tmp != null && tmp !="") di = new DirectoryInfo(Properties.Settings.Default.FormatPath); + if (tmp == null) tmp = ""; + di = new DirectoryInfo(Properties.Settings.Default.FormatPath); + //if (((tmp ?? "") == "") || (di != null && (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall")))) + if (di != null) { - while (((tmp ?? "") == "") || (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall"))) + //while (((tmp ?? "") == "") || (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall"))) + do { fbd.Description = "Select folder containing FmtAll and GenMacAll folders to update formats"; + fbd.SelectedPath = tmp; DialogResult dr = fbd.ShowDialog(); if (dr == DialogResult.Cancel) { @@ -1969,7 +1974,7 @@ namespace VEPROMS } di = new DirectoryInfo(fbd.SelectedPath); tmp = di.FullName; - } + } while (((tmp ?? "") == "") || (!di.Exists || !Directory.Exists(di.FullName + @"\fmtall") || !Directory.Exists(di.FullName + @"\genmacall"))); Properties.Settings.Default.FormatPath = fbd.SelectedPath; Properties.Settings.Default.Save(); }