LIB/GTK: remove the rest of the directory package
This commit is contained in:
@@ -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: ----
|
||||
|
||||
|
||||
Reference in New Issue
Block a user