diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-10 13:08:29 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-10 13:08:29 -0400 |
commit | 43412419ea8c2f26620a0bc837acf6f14f0afb12 (patch) | |
tree | 33165430ff51549cf927ed7462a0eac8e937accb /Core.hs | |
parent | 361d28e1389e218c1d0baf378a740570a139f730 (diff) |
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!
Diffstat (limited to 'Core.hs')
-rw-r--r-- | Core.hs | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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 |