On Sun, Oct 9, 2022 at 2:06 AM Zebediah Figura zfigura@codeweavers.com wrote:
On 7/21/22 08:37, Jinoh Kang wrote:
From: Jinoh Kang jinoh.kang.kr@gmail.com
On Windows, \Device\NamedPipe\ is the root directory of the named pipe file system (NPFS), and can be used as RootDirectory to skip its path when accessing the NPFS namespace.
This introduces a regression that makes it possible to use \Device\NamedPipe (note the lack of trailing backslash) as RootDirectory as well, since Wine does not distinguish between \Device\NamedPipe (the device itself) and \Device\NamedPipe\ (the root directory of the filesystem).
We should probably fix that first, then.
This is a previous iteration of the patch that attempts to fix both at once:
https://www.winehq.org/pipermail/wine-devel/2022-March/211849.html
This patch does not significantly from the patch mentioned in https://bugs.winehq.org/show_bug.cgi?id=52105.
The patch apparently never got merged becuase it involves a hack to differentiate \Device\NamedPipe\ and \Device\NamedPipe. The hack exploits the fact that `!name->len && name->str` when the path ends with a trailing slash. Properly differentiating the two would at least involve changes to the `lookup_name` function's parameters. Actually implementing \Device\NamedPipe's directory semantics (i.e. listing) would involve further changes to Wine's object manager emulation.