diff --git a/src/HPath/IO.hs-boot b/src/HPath/IO.hs-boot new file mode 100644 index 0000000..bee2a28 --- /dev/null +++ b/src/HPath/IO.hs-boot @@ -0,0 +1,7 @@ +module HPath.IO where + + +import HPath + +canonicalizePath :: Path Abs -> IO (Path Abs) + diff --git a/src/HPath/IO/Errors.hs b/src/HPath/IO/Errors.hs index e731494..40f4769 100644 --- a/src/HPath/IO/Errors.hs +++ b/src/HPath/IO/Errors.hs @@ -44,6 +44,10 @@ import GHC.IO.Exception IOErrorType ) import HPath +import {-# SOURCE #-} HPath.IO + ( + canonicalizePath + ) import HPath.IO.Utils import System.IO.Error ( @@ -194,8 +198,7 @@ throwDestinationInSource :: Path Abs -- ^ source dir -> IO () throwDestinationInSource source dest = do dest' <- (\x -> maybe x (\y -> x y) $ basename dest) - {- <$> (canonicalizePath $ P.dirname dest) -} - <$> (return $ dirname dest) + <$> (canonicalizePath $ dirname dest) dids <- forM (getAllParents dest') $ \p -> do fs <- PF.getSymbolicLinkStatus (fromAbs p) return (PF.deviceID fs, PF.fileID fs)