fsck: Failed to honor annex.diskreserve when checking a remote.

This commit is contained in:
Joey Hess 2015-12-11 13:50:27 -04:00
parent 4407df6314
commit abd66c7089
Failed to extract signature
3 changed files with 4 additions and 3 deletions

View file

@ -379,7 +379,7 @@ withTmp key action = do
- when doing concurrent downloads.
-}
checkDiskSpace :: Maybe FilePath -> Key -> Integer -> Bool -> Annex Bool
checkDiskSpace destination key alreadythere samefilesystem = ifM (Annex.getState Annex.force)
checkDiskSpace destdir key alreadythere samefilesystem = ifM (Annex.getState Annex.force)
( return True
, do
-- We can't get inprogress and free at the same
@ -403,7 +403,7 @@ checkDiskSpace destination key alreadythere samefilesystem = ifM (Annex.getState
_ -> return True
)
where
dir = maybe (fromRepo gitAnnexDir) return destination
dir = maybe (fromRepo gitAnnexDir) return destdir
needmorespace n =
warning $ "not enough free space, need " ++
roughSize storageUnits True n ++

View file

@ -162,7 +162,7 @@ performRemote key file backend numcopies remote =
let cleanup = liftIO $ catchIO (removeFile tmp) (const noop)
cleanup
cleanup `after` a tmp
getfile tmp = ifM (checkDiskSpace (Just tmp) key 0 True)
getfile tmp = ifM (checkDiskSpace (Just (takeDirectory tmp)) key 0 True)
( ifM (Remote.retrieveKeyFileCheap remote key (Just file) tmp)
( return (Just True)
, ifM (Annex.getState Annex.fast)

1
debian/changelog vendored
View file

@ -3,6 +3,7 @@ git-annex (5.20151209) UNRELEASED; urgency=medium
* Add S3 features to git-annex version output.
* webdav: When testing the WebDAV server, send a file with content.
The empty file it was sending tickled bugs in some php WebDAV server.
* fsck: Failed to honor annex.diskreserve when checking a remote.
-- Joey Hess <id@joeyh.name> Thu, 10 Dec 2015 11:39:34 -0400