diff options
Diffstat (limited to '')
-rw-r--r-- | lib/Paths.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Paths.hs b/lib/Paths.hs index 99774c5..7fae0df 100644 --- a/lib/Paths.hs +++ b/lib/Paths.hs @@ -36,9 +36,10 @@ parsePath text = -- how many steps upwards in the tree? up = length . filter (".." ==) . T.splitOn "/" $ prefix parts = T.splitOn "#" rest + -- `head` is unsafe, but splitOn will always produce lists with at least one element path = head parts fragment = if length parts >= 2 - then Just $ T.concat $ tail parts -- TODO! + then Just $ T.concat $ tail parts else Nothing instance PrettyPrint RelPath where |