Commit b37f9b7c authored by Steffen Michels's avatar Steffen Michels

Merge branch 'splitfilename' into 'master'

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

See merge request !106
parents 1846f0a3 1e435a79
Pipeline #9427 passed with stage
in 1 minute and 52 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