better cases
This commit is contained in:
parent
f8ebce9396
commit
824241b6fb
2 changed files with 3 additions and 4 deletions
|
@ -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 "."
|
||||
|
|
|
@ -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.
|
||||
-
|
||||
|
|
Loading…
Reference in a new issue