get rid of hardcoded "name" lookups

Support "sameas-name" being set instead.

In RenameRemote, rename which ever of the two is set.
This commit is contained in:
Joey Hess 2019-10-10 13:08:17 -04:00
parent 92ff30df70
commit d1130ea04a
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
15 changed files with 45 additions and 14 deletions

View file

@ -150,7 +150,7 @@ s3Setup' ss u mcreds c gc
| configIA c = archiveorg
| otherwise = defaulthost
where
remotename = fromJust (M.lookup "name" c)
remotename = fromJust (lookupName c)
defbucket = remotename ++ "-" ++ fromUUID u
defaults = M.fromList
[ ("datacenter", T.unpack $ AWS.defaultRegion AWS.S3)