mirror of
https://github.com/ScoopInstaller/Scoop.git
synced 2026-09-25 06:45:56 +00:00
fix(core): Fix is_in_dir under Unix (#5391)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
- **decompress:** Exclude '*.nsis' that may cause error ([#5294](https://github.com/ScoopInstaller/Scoop/issues/5294))
|
||||
- **autoupdate:** Fix file hash extraction ([#5295](https://github.com/ScoopInstaller/Scoop/issues/5295))
|
||||
- **shortcuts:** Output correctly formatted path ([#5333](https://github.com/ScoopInstaller/Scoop/issues/5333))
|
||||
- **core:** Fix `is_in_dir` under Unix ([#5391](https://github.com/ScoopInstaller/Scoop/issues/5391))
|
||||
|
||||
### Code Refactoring
|
||||
|
||||
|
||||
+1
-1
@@ -632,7 +632,7 @@ function cookie_header($cookies) {
|
||||
function is_in_dir($dir, $check) {
|
||||
$check = "$(fullpath $check)"
|
||||
$dir = "$(fullpath $dir)"
|
||||
$check -match "^$([regex]::escape("$dir"))(\\|`$)"
|
||||
$check -match "^$([regex]::Escape("$dir"))([/\\]|`$)"
|
||||
}
|
||||
|
||||
function ftp_file_size($url) {
|
||||
|
||||
Reference in New Issue
Block a user