Re: [Mingw-w64-public] [PATCH] crt: Reimplement `dirname()` and `basename()`

2023-03-28 Thread LIU Hao
在 2023/3/29 01:53, Corinna Vinschen 写道: Backslahs is one of the characters not allowed as part of a share name, just as it is not allowed as part of a filename. I. e. \\host\share is ok \\host\\share can't exist Yes, so the backslash between the host name and share name is special, righ

Re: [Mingw-w64-public] [PATCH] crt: Reimplement `dirname()` and `basename()`

2023-03-28 Thread Corinna Vinschen
On Mar 28 22:31, LIU Hao wrote: > 在 2023-03-28 21:41, Corinna Vinschen 写道: > > Either you allow to split the *entire* share path, so you can use > > dirname/basename to split \\host\share into the host and the share path, > > and also to split \\ and host. That would allow to inspect the host and

Re: [Mingw-w64-public] [PATCH] crt: Reimplement `dirname()` and `basename()`

2023-03-28 Thread LIU Hao
在 2023-03-28 21:41, Corinna Vinschen 写道: Either you allow to split the *entire* share path, so you can use dirname/basename to split \\host\share into the host and the share path, and also to split \\ and host. That would allow to inspect the host and share components using the same functions.

Re: [Mingw-w64-public] [PATCH] crt: Reimplement `dirname()` and `basename()`

2023-03-28 Thread Corinna Vinschen
On Mar 28 19:18, LIU Hao wrote: > 在 2023/3/28 10:49, LIU Hao 写道: > > > According to Microsoft documentation about paths, which I linked > > > yesterday, the `\\host\share` part > > is the name of a volume, so I think only the CMD behavior is right: > > `dirname()` should not remove `..` which would

Re: [Mingw-w64-public] [PATCH] crt: Reimplement `dirname()` and `basename()`

2023-03-28 Thread LIU Hao
在 2023/3/28 10:49, LIU Hao 写道: According to Microsoft documentation about paths, which I linked yesterday, the `\\host\share` part is the name of a volume, so I think only the CMD behavior is right: `dirname()` should not remove `..` which would move to a different volume. And here is the altern