From 25df5e5ae76e4c12971dbebe88515a08c8109fe6 Mon Sep 17 00:00:00 2001 From: Markus Fleschutz Date: Sat, 6 Feb 2021 15:16:36 +0100 Subject: [PATCH] Improved the scripts --- Scripts/list-formatted.ps1 | 2 +- Scripts/update-repos.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/list-formatted.ps1 b/Scripts/list-formatted.ps1 index 23d4b124..1b80b61e 100755 --- a/Scripts/list-formatted.ps1 +++ b/Scripts/list-formatted.ps1 @@ -11,7 +11,7 @@ param([string]$Dir = "") function ListDirectory { param([string]$Path) $Items = get-childItem -path $Path foreach ($Item in $Items) { - if ($Item.Mode -eq "d----") { + if ($Item.Mode -like "d*") { New-Object PSObject -Property @{ Filename = "$($Item.Name)/" } } else { New-Object PSObject -Property @{ Filename = "$($Item.Name)" } diff --git a/Scripts/update-repos.ps1 b/Scripts/update-repos.ps1 index c310a0a4..88091486 100755 --- a/Scripts/update-repos.ps1 +++ b/Scripts/update-repos.ps1 @@ -14,7 +14,7 @@ try { } $Items = get-childItem -path $Directory foreach ($Item in $Items) { - if ($Item.Mode -eq "d----") { + if ($Item.Mode -like "d*") { $Filename = $Item.Name write-host "" write-host -nonewline "Updating $Filename ..."