Compare commits
1
Commits
08ee699e44
...
v1.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
242307cee2 |
+9
-1
@@ -782,8 +782,16 @@ function Invoke-FilerScan {
|
|||||||
# Canonicalise the root once. Every child path is derived from this
|
# Canonicalise the root once. Every child path is derived from this
|
||||||
# string, and every length compared against -MaxPathLength is measured on
|
# string, and every length compared against -MaxPathLength is measured on
|
||||||
# it, so an 8.3 alias here would understate how long the real paths are.
|
# it, so an 8.3 alias here would understate how long the real paths are.
|
||||||
|
# ProviderPath, not Path: on a UNC root the latter comes back in
|
||||||
|
# provider-qualified form ("Microsoft.PowerShell.Core\FileSystem::\\srv\
|
||||||
|
# share"), which no Win32 call can open - the scan then found nothing.
|
||||||
$fullPath = $p
|
$fullPath = $p
|
||||||
try { $fullPath = (Resolve-Path -LiteralPath $p).Path } catch { }
|
try {
|
||||||
|
$rp = Resolve-Path -LiteralPath $p -ErrorAction Stop
|
||||||
|
$cand = [string]$rp.ProviderPath
|
||||||
|
if ([string]::IsNullOrWhiteSpace($cand)) { $cand = [string]$rp.Path }
|
||||||
|
if ($cand) { $fullPath = $cand }
|
||||||
|
} catch { }
|
||||||
$fullPath = Expand-FilerShortPath -Path $fullPath
|
$fullPath = Expand-FilerShortPath -Path $fullPath
|
||||||
$node = Get-FolderNode -Path $fullPath -MaxLen $MaxPathLength `
|
$node = Get-FolderNode -Path $fullPath -MaxLen $MaxPathLength `
|
||||||
-LongPaths $longPaths -ScanErrors $scanErrors -Progress $Progress
|
-LongPaths $longPaths -ScanErrors $scanErrors -Progress $Progress
|
||||||
|
|||||||
Reference in New Issue
Block a user