fsck: Failed to honor annex.diskreserve when checking a remote.
authorJoey Hess <joeyh@joeyh.name>
Fri, 11 Dec 2015 17:50:27 +0000 (13:50 -0400)
committerJoey Hess <joeyh@joeyh.name>
Fri, 11 Dec 2015 17:50:27 +0000 (13:50 -0400)
Annex/Content.hs
Command/Fsck.hs
debian/changelog

index 289a4f1b377fdb4e81fd55b0895debb693ef66a9..60ffb81417222701244c25ee988b6e156d74b706 100644 (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 ++
index 5a11ce192e0284452fe7424785182b59259360ca..1531d2ab76fcd8e57b2280efba2bc2e0727b1fe6 100644 (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)
index 3703e89b9f2c051ea27ae795cf3d98dc7b6f49ba..6c5430a9574e5bc0e63c32eae7314d22fd85a142 100644 (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