Opened 5 weeks ago

System.FilePath.Windows.combine does not really check isAbsolute

Reported by: Owned by: joeyhess normal libraries (other) 7.6.3 filepath Windows Unknown/Multiple None/Unknown Unknown

Description

"Combine two paths, if the second path isAbsolute, then it returns the second.¨

But, the implementation of combine checks if the first character of a path is a path separator, which on Windows is not the same as checking if isAbsolute.

This can have counterintuitive results. For example:

    import System.FilePath.Windows

prop_windows_is_sane :: Bool
prop_windows_is_sane = isAbsolute p || ("C:\\STUFF" </> p /= p)
where p = "\\foo\\bar"


Change History (0)

Note: See TracTickets for help on using tickets.