bugfix
The object's directory might exist if the backend picked the same key as was already present. That could happen, for example, if the sha1 is the same. Note that I chose to go ahead and replace the old content with the new. We don't know if they are the same (even with sha1, their timestamp or perms could differ), so have to assume the newer one is preffered. Although it won't propigate to other annexes, so it had better not be significantly different!
This commit is contained in:
parent
361d28e138
commit
43412419ea
1 changed files with 1 additions and 0 deletions
1
Core.hs
1
Core.hs
|
@ -173,6 +173,7 @@ moveAnnex key src = do
|
|||
let dir = parentDir dest
|
||||
liftIO $ do
|
||||
createDirectoryIfMissing True dir
|
||||
allowWrite dir -- in case the directory already exists
|
||||
renameFile src dest
|
||||
preventWrite dest
|
||||
preventWrite dir
|
||||
|
|
Loading…
Reference in a new issue