summaryrefslogtreecommitdiff
path: root/Remote/External.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 16:09:56 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 16:09:56 -0400
commit738233bdcfaf71432dba9f2857d0b3f69f14b8d5 (patch)
tree44f487071180b2c17cc7fa2c35ef7490d1dbb16f /Remote/External.hs
parentf7ef9c36f57f69d4ba6145c77553cfeabeabcbc2 (diff)
use subdir for addurl when it creates multiple files
The --file parameter specifies the subdir in this mode.
Diffstat (limited to 'Remote/External.hs')
-rw-r--r--Remote/External.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Remote/External.hs b/Remote/External.hs
index c5330f7ea..1a43a1ca7 100644
--- a/Remote/External.hs
+++ b/Remote/External.hs
@@ -434,10 +434,8 @@ checkurl :: External -> URLString -> Annex UrlContents
checkurl external url =
handleRequest external (CHECKURL url) Nothing $ \req -> case req of
CHECKURL_CONTENTS sz f -> Just $ return $ UrlContents sz
- (if null f then id else const f)
- CHECKURL_MULTI l -> Just $ return $ UrlNested $ map mknested l
+ (if null f then Nothing else 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"
_ -> Nothing
- where
- mknested (url', sz, f) = (url', UrlContents sz (const f))