On Dec 9 14:48, Federico Kircheis via Cygwin wrote: > On 09/12/2024 14.17, Corinna Vinschen via Cygwin wrote: > > On Dec 9 13:47, Federico Kircheis via Cygwin wrote: > > > 1) > > > root path, like C:\ , because for whatever reason \\?\C:\ is not valid, it > > > has to be a subfolder (and trying to trick it with \\?\C:\\ does not work > > > either). > > > > In which scenario? \\?\C:\ is just the same as \??\C:\ in NT speak, and > > that's a perfectly valid directory path. > > I've never seen \??\C:\.
Sorry for any confusion. \??\ is a symlink in the NT namespace and only used when calling kernel functions. It's basically the same as \\?\ and \\.\ in the Windows namespace, depending on the target. > My test case, from powershell (which I do definitively _not_ know well > enough, otherwise I wouldn't be using cygwin) was > > cd C:\ # success > cd \\?\C:\ # fail > cd C:\windows # success > cd \\?\C:\windows # success > > and repeat the same operation with dir instead of ls. > > The error message is that the "value of argument path is not valid" > > I did some further testing: no amount of quoting (with ", ' and `) helps, > also replacing \ with / does not change any outcome. > > For cd, the parameter -literal makes a difference > > cd -literal \\?\C:\ # success Huh! > Yes, -wa works; I wanted to point out that DOS paths are not a viable > workaround. > I could have left it out from my first mail, we agree no need to iterate > further ;) Yeah. The expression "DOS path" is a bit ambiguous. We like to use it to differentate DOS from POSIX paths, no matter if the "DOS path" is in long or short form. It's actually a bit puzzeling. Corinna -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple