summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-10-21 15:34:32 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-10-21 15:34:32 -0400
commit0f6dd9ebe8a1e56f6c598789e337fbf3a7bb8b73 (patch)
tree175c221be597bc01a5723184b4043c7a3e12da73
parenteaebc278765f0989092be6700cd70e9bec057b52 (diff)
add internet archive item url to info
-rw-r--r--Remote/S3.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs
index 5a956a5df..4b60b2bfc 100644
--- a/Remote/S3.hs
+++ b/Remote/S3.hs
@@ -5,7 +5,7 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-module Remote.S3 (remote, iaHost, isIA, isIAHost, iaItemUrl) where
+module Remote.S3 (remote, iaHost, isIA, iaItemUrl) where
import Network.AWS.AWSConnection
import Network.AWS.S3Object hiding (getStorageClass)
@@ -72,8 +72,12 @@ gen r u c gc = new <$> remoteCost gc expensiveRemoteCost
availability = GloballyAvailable,
remotetype = remote,
mkUnavailable = gen r u (M.insert "host" "!dne!" c) gc,
- getInfo = includeCredsInfo c (AWS.creds u)
- [ ("bucket", fromMaybe "unknown" (getBucket c)) ]
+ getInfo = includeCredsInfo c (AWS.creds u) $ catMaybes
+ [ Just ("bucket", fromMaybe "unknown" (getBucket c))
+ , if isIA c
+ then Just ("internet archive item", iaItemUrl $ fromMaybe "unknown" $ getBucket c)
+ else Nothing
+ ]
}
s3Setup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)