show S3 urls for public repos in whereis
Note that it's possible for a S3 bucket to be configured to allow public access, but for git-annex to not know that it is. I chose to not show the url unless public=yes.
This commit is contained in:
parent
c2cdc9a7cf
commit
f2486b21dd
1 changed files with 7 additions and 1 deletions
|
@ -82,7 +82,7 @@ gen r u c gc = do
|
||||||
, removeKey = removeKeyDummy
|
, removeKey = removeKeyDummy
|
||||||
, checkPresent = checkPresentDummy
|
, checkPresent = checkPresentDummy
|
||||||
, checkPresentCheap = False
|
, checkPresentCheap = False
|
||||||
, whereisKey = Nothing
|
, whereisKey = Just (getWebUrls info)
|
||||||
, remoteFsck = Nothing
|
, remoteFsck = Nothing
|
||||||
, repairRepo = Nothing
|
, repairRepo = Nothing
|
||||||
, config = c
|
, config = c
|
||||||
|
@ -593,3 +593,9 @@ s3Info c info = catMaybes
|
||||||
]
|
]
|
||||||
where
|
where
|
||||||
s3c = s3Configuration c
|
s3c = s3Configuration c
|
||||||
|
|
||||||
|
getWebUrls :: S3Info -> Key -> Annex [URLString]
|
||||||
|
getWebUrls info k = case (public info, getpublicurl info) of
|
||||||
|
(True, Just geturl) -> return [geturl k]
|
||||||
|
_ -> return []
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue