From a1a2c16b6b3d463c17e0cbaf7db44a732d0ddf9a Mon Sep 17 00:00:00 2001 From: Erik Date: Thu, 9 Jan 2025 13:06:02 -0700 Subject: [PATCH] bugfix - I forgot order of operations ;) --- Copy-Revit2Egnyte.ps1 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Copy-Revit2Egnyte.ps1 b/Copy-Revit2Egnyte.ps1 index 531e927..a935d0d 100644 --- a/Copy-Revit2Egnyte.ps1 +++ b/Copy-Revit2Egnyte.ps1 @@ -77,6 +77,11 @@ foreach ($folder in $Local_Folder_List) { else { $FolderName = $folder.Name $path_to_pathtxt = $folder.FullName + "\path.txt" + if ((get-content $path_to_pathtxt) -eq "IgnoreMe") { + # allows us to set folders to ignored by changing Path.txt to contain IgnoreMe + # Break leaves the loop and goes to the next iteration + break + } $PAthTXT_Exists = Test-Path $path_to_pathtxt @@ -100,10 +105,7 @@ foreach ($folder in $Local_Folder_List) { $ErrorMessage += '`"' + $FolderName + "`": Path.txt must specify only one path.
" } - if ($Egnyte_Path -eq "IgnoreMe") { - # allows us to set folders to ignored by changing Path.txt to contain IgnoreMe - $Egnyte_Path_Valid = $false - } + else { $Egnyte_Path_Valid = $true }