diff options
author | Joey Hess <joeyh@joeyh.name> | 2014-12-11 17:44:27 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-11 17:44:27 -0400 |
commit | 7efc177f1a75cfdccb08cc195cbca3f880de59ad (patch) | |
tree | 78407d4f624cb7d6cf71624ce774583736657ab9 /Remote | |
parent | 5fa139a8c3f2479fcb3d194b34bca472f343c35d (diff) |
simplify external special remote implementation
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/External.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Remote/External.hs b/Remote/External.hs index 1a43a1ca7..7e2b2d0b0 100644 --- a/Remote/External.hs +++ b/Remote/External.hs @@ -435,6 +435,10 @@ checkurl external url = handleRequest external (CHECKURL url) Nothing $ \req -> case req of CHECKURL_CONTENTS sz f -> Just $ return $ UrlContents sz (if null f then Nothing else Just f) + -- Treat a single item multi response specially to + -- simplify the external remote implementation. + CHECKURL_MULTI ((_, sz, f):[]) -> + Just $ return $ UrlContents sz (Just f) CHECKURL_MULTI l -> Just $ return $ UrlMulti l CHECKURL_FAILURE errmsg -> Just $ error errmsg UNSUPPORTED_REQUEST -> error "CHECKURL not implemented by external special remote" |