/ go Public
os: FileInfo Mode on Windows incorrectly interpreting WSL symlinks (reparse points) as regular files always #42184
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
What version of Go are you using (
Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
What did you do?
os.FileInfo.Mode.IsRegularand got the wrong result.
This is caused by a WSL symlink:
Running the following go code:
Windows is definitely telling us it's a reparse point:
FileAttributes: 0x420includes the 1024 required. The issue here is the value of
Reserved0, which is not being tested for:
According to https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-fscc/c8e77b37-3909-4fe6-a4ea-2b9d423b1ee4
This appears it would require a change to src/os/types_windows.go lines 104,105.
The text was updated successfully, but these errors were encountered: