Skip to content

Commit ac8a156

Browse files
committed
is_in_dir: return true for checking if a directory is 'in' itself
1 parent a572724 commit ac8a156

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/install.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ function dl_urls($app, $version, $manifest, $architecture, $dir) {
156156
$fname # returns the last downloaded file
157157
}
158158

159-
function is_in_dir($dir, $file) {
160-
$file = "$(fullpath $file)"
159+
function is_in_dir($dir, $check) {
160+
$check = "$(fullpath $check)"
161161
$dir = "$(fullpath $dir)"
162-
$file -match "^$([regex]::escape("$dir\"))"
162+
$check -match "^$([regex]::escape("$dir"))(\\|`$)"
163163
}
164164

165165
# hashes

0 commit comments

Comments
 (0)