diff --git a/app/Main.hs b/app/Main.hs index 036e088..8fac5d0 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -50,7 +50,7 @@ parseArgs (Args t dir h v r c b) = do if b then do mapM_ (mkIndex r dir) . filter (isSuffixOf ".gmi") =<< getDirectoryContents dir putStr "\n" - putStrLn "=> ../ " + putStrLn "=> .. " else mapM_ (mkIndex r dir) . filter (isSuffixOf ".gmi") =<< getDirectoryContents dir mkIndex :: Bool -> FilePath -> FilePath -> IO () @@ -68,7 +68,7 @@ mkIndex True d l = cleanString = filter (/= "") . map (dropWhile (== '#')) -- in case the last character is a dot, remove it appendDots name - | last name == '.' = (++ "...") . init $ name + | last name == '.' = (++ "...") . reverse . dropWhile (=='.') . reverse $ name | otherwise = name in do line <- trim . words . head . lines <$> readFile path