diff options
-rw-r--r-- | Remote/WebDAV.hs | 5 |
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 |