From b327409d72e48c523b20866751fb71de2b5c176c Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 15 Feb 2012 20:38:28 +0000 Subject: [PATCH] extra validationn to assure procedure folder contains procedure data --- PROMS/DataLoader/DataLoaderSettings.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/PROMS/DataLoader/DataLoaderSettings.cs b/PROMS/DataLoader/DataLoaderSettings.cs index 6ab0668c..75028a1a 100644 --- a/PROMS/DataLoader/DataLoaderSettings.cs +++ b/PROMS/DataLoader/DataLoaderSettings.cs @@ -294,10 +294,21 @@ namespace DataLoader ErrorPrefix = ""; } // ProcedureSetPath = If OnlyThisSet is checked, then has to be non-blank - if (OnlyThisSet && (ProcedureSetPath ?? "") == "" || !Directory.Exists(ProcedureSetPath)) + if (OnlyThisSet) { - sb.Append(ErrorPrefix + "Procedure Folder must point to an existing folder\r\n"); - ErrorPrefix = ""; + if ((ProcedureSetPath ?? "") == "" || !Directory.Exists(ProcedureSetPath)) + { + sb.Append(ErrorPrefix + "Procedure Folder must point to an existing folder\r\n"); + ErrorPrefix = ""; + } + else + { + if (!File.Exists(ProcedureSetPath + @"\set.dbf")) + { + sb.Append(ErrorPrefix + "Procedure Folder must point to an existing procedure data folder\r\n"); + ErrorPrefix = ""; + } + } } // BackupFileName = Has to be non-blank if ((BackupFileName ?? "") == "")