better cases

This commit is contained in:
Joey Hess 2013-08-22 23:44:13 -04:00
parent f8ebce9396
commit 824241b6fb
2 changed files with 3 additions and 4 deletions

View file

@ -58,9 +58,9 @@ start relaxed optfile pathdepth s = go $ fromMaybe bad $ parseURI s
parseURI $ escapeURIString isUnescapedInURI s'
badquvi = error $ "quvi does not know how to download url " ++ s'
choosefile = flip fromMaybe optfile
go url
| downloader == QuviDownloader = usequvi
| otherwise = ifM (liftIO $ Quvi.supported s')
go url = case downloader of
QuviDownloader -> usequvi
DefaultDownloader -> ifM (liftIO $ Quvi.supported s')
( usequvi
, do
pathmax <- liftIO $ fileNameLengthLimit "."

View file

@ -106,7 +106,6 @@ knownUrls = do
geturls (Just logsha) = getLog . L.unpack <$> catObject logsha
data Downloader = DefaultDownloader | QuviDownloader
deriving (Eq)
{- Determines the downloader for an URL.
-