diff options
author | Joey Hess <joey@kitenet.net> | 2011-04-25 22:04:12 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-04-25 22:04:12 -0400 |
commit | 70d4e7349bd7ed04a9cc8c1b309c1fdfb375a7af (patch) | |
tree | b77667d3fa21a05b48794982c9f2157c171ff5ca /Content.hs | |
parent | 4ea9579b42aff232090e8238e27d5eec3001bd69 (diff) |
ensure tmp file is writable, so rsync can resume
It's possible that rsync finishes transferring a file and sets its mode,
but the file transfer to the annex then fails. When resuming, rsync
would then not be able to write to the tmp file.
Diffstat (limited to 'Content.hs')
-rw-r--r-- | Content.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Content.hs b/Content.hs index bf9456221..dd0ea5ca1 100644 --- a/Content.hs +++ b/Content.hs @@ -103,6 +103,8 @@ getViaTmp key action = do checkDiskSpace' (fromIntegral $ fileSize stat) key else checkDiskSpace key + when e $ liftIO $ allowWrite tmp + getViaTmpUnchecked key action {- Like getViaTmp, but does not check that there is enough disk space |