summaryrefslogtreecommitdiff
path: root/Remote/WebDAV.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-08-08 14:19:08 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-08-08 14:19:08 -0400
commit49f5a1be8bc8b6aee6d65d61d316571317b79174 (patch)
tree0f0955b390e576f425eaab14e2ce192d3437b02b /Remote/WebDAV.hs
parente90f4c9b7c15c7a86b099e2f76d02237b78054e7 (diff)
show missing url= parameter error sooner
Diffstat (limited to 'Remote/WebDAV.hs')
-rw-r--r--Remote/WebDAV.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs
index 2c621b633..af3af7902 100644
--- a/Remote/WebDAV.hs
+++ b/Remote/WebDAV.hs
@@ -77,8 +77,9 @@ gen r u c gc = new <$> remoteCost gc expensiveRemoteCost
webdavSetup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID)
webdavSetup mu mcreds c = do
u <- maybe (liftIO genUUID) return mu
- let url = fromMaybe (error "Specify url=") $
- M.lookup "url" c
+ url <- case M.lookup "url" c of
+ Nothing -> error "Specify url="
+ Just url -> return url
c' <- encryptionSetup c
creds <- maybe (getCreds c' u) (return . Just) mcreds
testDav url creds