It was just slapping on a path separator to the front of the path to
make it absolute, but on windows, a path like "//foo/bar" actually
has a network "drive" of "//foo" and so that broke the test case.
Since "a:foo" is a somehow relative path on windows
(who knows how), drop any drive from the input. But dropDrive also drops
any leading path separator, making the input path relative. So now
it should be safe to slapp on a leading path separator.
, relPathDirToFileAbs p p == ""
]
where
- p = pathSeparator `B.cons` toRawFilePath (fromTestableFilePath pt)
+ -- Make the input an absolute path, since relPathDirToFileAbs
+ -- needs absolute paths.
+ p = pathSeparator `B.cons` dropDrive
+ (toRawFilePath (fromTestableFilePath pt))
prop_relPathDirToFileAbs_regressionTest :: Bool
prop_relPathDirToFileAbs_regressionTest = same_dir_shortcurcuits_at_difference
[[!meta author=yoh]]
[[!tag projects/datalad]]
+
+> [[fixed|done]] --[[Joey]]