LIB: rm unneded import
This commit is contained in:
parent
27673b0751
commit
af6516a454
@ -85,10 +85,6 @@ import Safe
|
|||||||
atDef
|
atDef
|
||||||
, initDef
|
, initDef
|
||||||
)
|
)
|
||||||
import System.Directory
|
|
||||||
(
|
|
||||||
canonicalizePath
|
|
||||||
)
|
|
||||||
import System.FilePath
|
import System.FilePath
|
||||||
(
|
(
|
||||||
combine
|
combine
|
||||||
@ -598,18 +594,6 @@ normalize fp =
|
|||||||
ff x y = x ++ [y]
|
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: ----
|
---- IO HELPERS: ----
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user