aboutsummaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-09-12 12:45:33 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-09-12 12:47:43 -0400
commitdf0b06d217524407965942455032bc5d9eefa247 (patch)
treed2005de3172221986a4ea868e5fd31c1e6291801 /Remote
parent77d12a9d0ecf75d74508d9a08bfc31e37cae6839 (diff)
stop warning about removals from IA
In a test, I uploaded a pdf, and several files were derived from it. After removing the pdf, the derived files went away after approximatly half an hour. This window does not seem worth warning about every time. Documented it in the tip.
Diffstat (limited to 'Remote')
-rw-r--r--Remote/S3.hs11
1 files changed, 2 insertions, 9 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs
index bfb80b61f..c8092a4c9 100644
--- a/Remote/S3.hs
+++ b/Remote/S3.hs
@@ -278,18 +278,11 @@ retrieveCheap _ _ _ = return False
- While it may remove the file, there are generally other files
- derived from it that it does not remove. -}
remove :: S3Info -> S3Handle -> Remover
-remove info h k = warnIARemoval info $ do
+remove info h k = do
res <- tryNonAsync $ sendS3Handle h $
S3.DeleteObject (T.pack $ bucketObject info k) (bucket info)
return $ either (const False) (const True) res
-warnIARemoval :: S3Info -> Annex a -> Annex a
-warnIARemoval info a
- | isIA info = do
- warning "Derived versions of removed file may still be present in the Internet Archive"
- a
- | otherwise = a
-
checkKey :: Remote -> S3Info -> Maybe S3Handle -> CheckPresent
checkKey r info Nothing k = case getpublicurl info of
Nothing -> do
@@ -345,7 +338,7 @@ retrieveExportS3 r info _k loc f p =
return True
removeExportS3 :: Remote -> S3Info -> Key -> ExportLocation -> Annex Bool
-removeExportS3 r info _k loc = warnIARemoval info $
+removeExportS3 r info _k loc =
catchNonAsync go (\e -> warning (show e) >> return False)
where
go = withS3Handle (config r) (gitconfig r) (uuid r) $ \h -> do