System.FilePath.Windows.combine does not really check isAbsolute
|Reported by:||joeyhess||Owned by:||thomie|
|Type of failure:||None/Unknown||Test Case:|
|Related Tickets:||Differential Rev(s):|
"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 (5)
comment:1 Changed 2 years ago by thomie
- Owner set to thomie
- Version changed from 7.6.3 to 7.9
comment:4 Changed 2 years ago by thoughtpolice
- Component changed from libraries (other) to Core Libraries