LIB: minor improvement to copyDir
This commit is contained in:
parent
da32ccf619
commit
06151a3a08
@ -138,8 +138,8 @@ runFileOp _ = return Nothing
|
|||||||
-- * `DirDoesExist` if the target directory already exists during the Strict
|
-- * `DirDoesExist` if the target directory already exists during the Strict
|
||||||
-- copy mode
|
-- copy mode
|
||||||
-- * anything that `copyFileToDir`, `getFileStatus`, `createDirectory`,
|
-- * anything that `copyFileToDir`, `getFileStatus`, `createDirectory`,
|
||||||
-- `easyDelete`, `readSymbolicLink`, `createDirectoryIfMissing`,
|
-- `easyDelete`, `createDirectoryIfMissing`,
|
||||||
-- `removeDirectoryRecursive`, `createSymbolicLink`, `copyDir`,
|
-- `removeDirectoryRecursive`, `recreateSymlink`, `copyDir`,
|
||||||
-- `copyFileToDir`, `getDirectoryContents` throws
|
-- `copyFileToDir`, `getDirectoryContents` throws
|
||||||
copyDir :: DirCopyMode
|
copyDir :: DirCopyMode
|
||||||
-> FilePath -- ^ source dir
|
-> FilePath -- ^ source dir
|
||||||
@ -183,7 +183,7 @@ copyDir cm from' to' = do
|
|||||||
recreateSymlink' destdir n f = do
|
recreateSymlink' destdir n f = do
|
||||||
let sympoint = destdir </> n
|
let sympoint = destdir </> n
|
||||||
|
|
||||||
case cm of
|
_ <- case cm of
|
||||||
-- delete old file/dir to be able to create symlink
|
-- delete old file/dir to be able to create symlink
|
||||||
Merge -> easyDelete sympoint
|
Merge -> easyDelete sympoint
|
||||||
_ -> return ()
|
_ -> return ()
|
||||||
|
Loading…
Reference in New Issue
Block a user