From 43412419ea8c2f26620a0bc837acf6f14f0afb12 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 10 Nov 2010 13:08:29 -0400 Subject: [PATCH] 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! --- Core.hs | 1 + 1 file changed, 1 insertion(+) diff --git a/Core.hs b/Core.hs index 304c8a9232..f9c9417bd8 100644 --- a/Core.hs +++ b/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