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. -}
|
- down. -}
|
||||||
finalizeStoreGeneric :: FilePath -> FilePath -> FilePath -> IO ()
|
finalizeStoreGeneric :: FilePath -> FilePath -> FilePath -> IO ()
|
||||||
finalizeStoreGeneric d tmp dest = do
|
finalizeStoreGeneric d tmp dest = do
|
||||||
void $ tryIO $ allowWrite dest -- may already exist
|
removeDirGeneric d dest
|
||||||
void $ tryIO $ removeDirectoryRecursive dest -- or not exist
|
|
||||||
createDirectoryUnder d (parentDir dest)
|
createDirectoryUnder d (parentDir dest)
|
||||||
renameDirectory tmp dest
|
renameDirectory tmp dest
|
||||||
-- may fail on some filesystems
|
-- may fail on some filesystems
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
[[!comment format=mdwn
|
||||||
|
username="joey"
|
||||||
|
subject="""comment 3"""
|
||||||
|
date="2020-10-23T20:10:27Z"
|
||||||
|
content="""
|
||||||
|
Turns out Remote.Directory was using removeDirGeneric everywhere it needed
|
||||||
|
to remove a directory, except for in what I believe is failing here.
|
||||||
|
And removeDirGeneric already has a workaround for some windows quirk in it.
|
||||||
|
|
||||||
|
So I changed that to use it too. I don't know if that will fix the problem.
|
||||||
|
"""]]
|
Loading…
Add table
Add a link
Reference in a new issue