fix build w/o s3
This commit is contained in:
parent
440d6e331f
commit
8a7e059f54
2 changed files with 6 additions and 0 deletions
|
@ -156,6 +156,7 @@ postAddGlacierR = glacierConfigurator $ do
|
|||
setStandardGroup (Remote.uuid r) SmallArchiveGroup
|
||||
|
||||
getEnableS3R :: UUID -> Handler RepHtml
|
||||
#ifdef WITH_S3
|
||||
getEnableS3R uuid = do
|
||||
m <- liftAnnex readRemoteLog
|
||||
let host = fromMaybe "" $ M.lookup "host" $
|
||||
|
@ -163,6 +164,9 @@ getEnableS3R uuid = do
|
|||
if S3.isIAHost host
|
||||
then redirect $ EnableIAR uuid
|
||||
else postEnableS3R uuid
|
||||
#else
|
||||
getEnableS3R = postEnableS3R
|
||||
#endif
|
||||
|
||||
postEnableS3R :: UUID -> Handler RepHtml
|
||||
#ifdef WITH_S3
|
||||
|
|
|
@ -152,6 +152,7 @@ postEnableIAR = iaConfigurator . enableIARemote
|
|||
postEnableIAR _ = error "S3 not supported by this build"
|
||||
#endif
|
||||
|
||||
#ifdef WITH_S3
|
||||
enableIARemote :: UUID -> Widget
|
||||
enableIARemote uuid = do
|
||||
((result, form), enctype) <- lift $
|
||||
|
@ -166,6 +167,7 @@ enableIARemote uuid = do
|
|||
description <- liftAnnex $
|
||||
T.pack <$> Remote.prettyUUID uuid
|
||||
$(widgetFile "configurators/enableia")
|
||||
#endif
|
||||
|
||||
{- Convert a description into a bucket item name, which will also be
|
||||
- used as the repository name, and the preferreddir.
|
||||
|
|
Loading…
Reference in a new issue