LIB/GTK: remove the rest of the directory package

This commit is contained in:
2015-12-27 19:26:58 +01:00
parent aba62f03f2
commit 54af33f3a7
6 changed files with 55 additions and 47 deletions

View File

@@ -86,10 +86,6 @@ import Safe
atDef
, initDef
)
import System.Directory
(
canonicalizePath
)
import System.FilePath
(
combine
@@ -605,18 +601,6 @@ normalize fp =
ff x y = x ++ [y]
-- |Like `canonicalizePath` from System.Directory, but preserves the last
-- component if it's a symlink.
canonicalizePath' :: FilePath -> IO FilePath
canonicalizePath' fp = do
-- TODO: throw fileDoesNotExist error earlier
isSymlink <- PF.isSymbolicLink <$> PF.getSymbolicLinkStatus fp
if isSymlink
then do
cbase <- canonicalizePath (baseDir fp)
return $ cbase </> topDir fp
else canonicalizePath fp
---- IO HELPERS: ----