Commit 1e435a79 authored by Camil Staps's avatar Camil Staps 🐧

splitFileName should return "" for directory when only a filename is given

parent 1846f0a3
Pipeline #9400 passed with stage
in 1 minute and 49 seconds
......@@ -53,7 +53,7 @@ addTrailingPathSeparator path = if (hasTrailingPathSeparator path) path (path ++
splitFileName :: !FilePath -> (String, String)
splitFileName path =
case lastIndexOf {pathSeparator} path of
-1 -> (path, "")
-1 -> ("", path)
i -> (subString 0 i path, subString (i+1) (size path - i - 1) path)
takeDirectory :: !FilePath -> FilePath
......
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