Skip to content

SystemTools: Improve repeated slash handling in ConvertToUnixSlashes

Nikita Nemkin requested to merge nnemkin/kwsys:path-tounix into master

Collapse repeated slashes, but preserve exactly two leading slashes. POSIX reserves exactly two leading slashes for implementation-defined behavior. On Windows and Cygwin they mark UNC paths.

There is some research on what leading double slashes actually do on various systems. Mostly, it's nothing or non-filesystem things.

Issue: cmake/cmake#9182 (closed)
Issue: cmake/cmake#26667 (closed)

Edited by Brad King

Merge request reports

Loading