use removeDirGeneric here too for consistency
And because it might be more robust on windows.
This commit is contained in:
parent
f167851628
commit
b2bf099aa3
2 changed files with 12 additions and 2 deletions
|
@ -195,8 +195,7 @@ store d chunkconfig k b p = liftIO $ do
|
|||
- down. -}
|
||||
finalizeStoreGeneric :: FilePath -> FilePath -> FilePath -> IO ()
|
||||
finalizeStoreGeneric d tmp dest = do
|
||||
void $ tryIO $ allowWrite dest -- may already exist
|
||||
void $ tryIO $ removeDirectoryRecursive dest -- or not exist
|
||||
removeDirGeneric d dest
|
||||
createDirectoryUnder d (parentDir dest)
|
||||
renameDirectory tmp dest
|
||||
-- may fail on some filesystems
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue