dart-lang/path

Windows paths shouldn't be canonicalized to lower-case

Opened this issue · 2 comments

nex3 commented

Although most paths on Windows are case-insensitive, it's possible to set certain directories as case-sensitive. This means that canonicalize() as currently implemented—converting all Windows paths to lower case—can cause a valid path to become invalid. It should probably instead match the behavior of other filesystems (including Mac OS which is also sometimes case-sensitive) and leave the case as-is.

Note that this means that, in general, paths cannot be truly canonicalized (in the sense of "guaranteeing that two paths that refer to the same location on disk will have the same string") without actually interacting with the filesystem on Windows (or Mac OS). This should probably be called out in the documentation.

nex3 commented

See sass/dart-sass#1169 where we hit this in practice.

Have the same problem