Commit f9ae34b0 authored by thomie's avatar thomie
Browse files

Bug fix: isDrive "" == False

isDrive is only called from `dropTrailingPathSeparator` and `combineAlways`.
Both times occur after a check if the argument is not empty (i.e. null for
combineAlways, and hasTrailingPathSeparator for dropTrailingPathSeparator). So
this change is safe.
parent fd201b7f
......@@ -422,8 +422,9 @@ hasDrive = not . null . takeDrive
-- > Posix: isDrive "/foo" == False
-- > Windows: isDrive "C:\\" == True
-- > Windows: isDrive "C:\\foo" == False
-- > isDrive "" == False
isDrive :: FilePath -> Bool
isDrive = null . dropDrive
isDrive x = not (null x) && null (dropDrive x)
---------------------------------------------------------------------
......
......@@ -4,6 +4,8 @@
* Bundled with GHC 7.10.1
* Bug fix: `isDrive ""` now retuns `False`, instead of `True`.
* Bug fix: on Windows, `dropTrailingPathSeparator "/"` now returns `"/"`
unchanged, instead of the normalised `"\\"`.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment