summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/Migrate.hs2
-rw-r--r--Command/SetKey.hs3
-rw-r--r--Command/Unlock.hs2
3 files changed, 5 insertions, 2 deletions
diff --git a/Command/Migrate.hs b/Command/Migrate.hs
index 584f6e34e..56147113b 100644
--- a/Command/Migrate.hs
+++ b/Command/Migrate.hs
@@ -55,7 +55,7 @@ perform file oldkey newbackend = do
case stored of
Nothing -> return Nothing
Just (newkey, _) -> do
- ok <- getViaTmp newkey $ \t -> do
+ ok <- getViaTmpUnchecked newkey $ \t -> do
-- Make a hard link to the old backend's
-- cached key, to avoid wasting disk space.
liftIO $ createLink src t
diff --git a/Command/SetKey.hs b/Command/SetKey.hs
index af46fe06e..6f6078e4b 100644
--- a/Command/SetKey.hs
+++ b/Command/SetKey.hs
@@ -32,7 +32,8 @@ perform :: FilePath -> CommandPerform
perform file = do
key <- cmdlineKey
-- the file might be on a different filesystem, so mv is used
- -- rather than simply calling moveToObjectDir
+ -- rather than simply calling moveToObjectDir; disk space is also
+ -- checked this way.
ok <- getViaTmp key $ \dest -> do
if dest /= file
then liftIO $
diff --git a/Command/Unlock.hs b/Command/Unlock.hs
index ac7b22ac7..bf593e1e9 100644
--- a/Command/Unlock.hs
+++ b/Command/Unlock.hs
@@ -41,6 +41,8 @@ perform dest key = do
inbackend <- Backend.hasKey key
when (not inbackend) $
error "content not present"
+
+ checkDiskSpace key
g <- Annex.gitRepo
let src = gitAnnexLocation g key