files-community / files-community/Files

Bug: `Microsoft.PowerShell.Core\FileSystem::`-prefixed paths are inaccessible, with incorrect errors returned.

Open
#17,545 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
C#
Stars
45.4k
Forks
2.9k
Avg merge
19h 7m
Merged PRs (30d)
62

Description

### Description

If I visit `files-preview "\\wsl.localhost\fedoraremix\mnt\rjlb\data\'Entities'#.dir\'Specific'#.dir"`, then invoke a terminal instance via its context menu, I am brought to `Microsoft.PowerShell.Core\FileSystem::\\wsl.localhost\fedoraremix\mnt\rjlb\data\'Entities'#.dir\'Specific'#.dir`. If I invoke `files-preview "$PWD"`, it fails:

Image

If I instead attempt to enter it via the omnibox, I see:

Image

It vaguely reminds me of https://github.com/files-community/Files/issues/6495#issue-1025774393.

### Steps To Reproduce

1. ~~~pwsh
#!/usr/bin/env pwsh
#Requires -PSEdition Core
#Requires -Version 7.6
If ($IsWindows) {
$Path = @{
Base = "\\wsl.localhost\fedoraremix\mnt\rjlb\data\'Entities'#.dir"
Name = "'Specific'#.dir"
}
New-Item `
-Path $Path.Base `
-Name $Path.Name `
-ItemType "Directory"
files-preview (Join-Path -Path $Path.Base -ChildPath $Path.Name)
}
~~~

If that's insufficient, see https://github.com/files-community/Files/issues/17205#issue-3165260231.

1. Invoke a new context menu.

1. Select "Open in Windows Terminal".

1. ~~~pwsh
#!/usr/bin/env pwsh
#Requires -PSEdition Core
#Requires -Version 7.6
If ($IsWindows) { files-preview $PWD }
~~~

### Files Version

4.0.0.0

### Windows Version

10.0.26120.2415

### User ID

e4dbf827-4768-4402-9b6c-9e97b77ac86e

### Log File

[debug.log](https://github.com/user-attachments/files/22162761/debug.log)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.