Open sohrab-niche opened 2 weeks ago
Summary: The Link::existsSync()
method on Windows incorrectly fails to detect a symlink to a folder when the case of the symlink path differs from the actual folder path. For example, a symlink named "A:\b\Hello" fails to find a folder named "A:\b\hello".
You would need to provide a reproduction. I have tried simple test:
import 'dart:io';
void main() async {
Link('c:\\src\\aaa').createSync('C:\\src\\dart');
print(Link('c:\\src\\aAa').existsSync());
}
and it does not reveal any case sensitivity.
That being said: it might be that A:\b\Hello
is treated in a case-sensitive manner by the OS due to various reasons. You can try to check that using command like this (see https://learn.microsoft.com/en-us/windows/wsl/case-sensitivity#inspect-current-case-sensitivity):
fsutil.exe file queryCaseSensitiveInfo <path>
Link::existsSync() fails on windows when symlink to a folder exists, but with different case.
For example, the Link object is created with path A:\b\Hello. But the symlink to the folder already exists as A:\b\hello.
Dart version and tooling diagnostic info (
dart info
) dart infoGeneral info
Dart 3.5.3 (stable) (Wed Sep 11 16:22:47 2024 +0000) on "windows_x64"
on windows / "Windows 10 Pro" 10.0 (Build 22631)
locale is en-IN
Process info