System.FilePath.Windows.combine does not really check isAbsolute
"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"
Trac metadata
Trac field | Value |
---|---|
Version | 7.6.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | libraries (other) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |