bytecodealliance / bytecodealliance/cap-std

UNC and other DOS Device Paths unusable

Offen
#348 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
help wanted
Vorherrschende Sprache
Rust
Sterne
821
Forks
57
Ø Merge
1 Std. 16 Min.
Gemergte PRs (30 T.)
4

Beschreibung

The following logic:
https://github.com/bytecodealliance/cap-std/blob/72fdc307184a642eadef22864434109c01d01528/cap-primitives/src/windows/fs/get_path.rs#L18-L22

completely breaks DOS device UNC paths such as:
```
\\?\UNC\server\share\bar.exe
```
which would have to be translated to:
```
\\server\share\bar.exe
```
in addition to that, other DOS device paths such as:
```
\\?\Volume{b75e2c83-0000-0000-0000-602f00000000}\Test\Foo.txt
```
get completely ruined.

There also is a lack of `\\.\` handling. I'm also not sure why this gets stripped in the first place, `join` can handle these paths just fine.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.