diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-03-27 18:49:03 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-03-27 18:49:03 -0400 |
commit | 4cadfec3a00ece05576fbe289c4639e13b16ad52 (patch) | |
tree | 52567cf8b047ca042c773d3d33155c151fc9ce5f | |
parent | 46407825b3b01de93fa0101cad84d719d9dc0653 (diff) |
Fix GETURLS in external special remote protocol to strip downloader prefix from logged url info before checking for the specified prefix.
This doesn't change what GETURLS returns, but only whether it matches
any prefix that the external special remote asked for.
-rw-r--r-- | Logs/Web.hs | 4 | ||||
-rw-r--r-- | Remote/External.hs | 3 | ||||
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | doc/bugs/GETURLS_doesn__39__t_return_URLs_if_prefix_is_provided.mdwn | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/Logs/Web.hs b/Logs/Web.hs index b2935f1a0..ed2f575bd 100644 --- a/Logs/Web.hs +++ b/Logs/Web.hs @@ -50,7 +50,9 @@ getUrls key = do else return us getUrlsWithPrefix :: Key -> String -> Annex [URLString] -getUrlsWithPrefix key prefix = filter (prefix `isPrefixOf`) <$> getUrls key +getUrlsWithPrefix key prefix = filter (prefix `isPrefixOf`) + . map (fst . getDownloader) + <$> getUrls key setUrlPresent :: UUID -> Key -> URLString -> Annex () setUrlPresent uuid key url = do diff --git a/Remote/External.hs b/Remote/External.hs index 7dd1736e4..39531998d 100644 --- a/Remote/External.hs +++ b/Remote/External.hs @@ -228,8 +228,7 @@ handleRequest' lck external req mp responsehandler handleRemoteRequest (SETURIMISSING key uri) = withurl (SETURLMISSING key) uri handleRemoteRequest (GETURLS key prefix) = do - mapM_ (send . VALUE . fst . getDownloader) - =<< getUrlsWithPrefix key prefix + mapM_ (send . VALUE) =<< getUrlsWithPrefix key prefix send (VALUE "") -- end of list handleRemoteRequest (DEBUG msg) = liftIO $ debugM "external" msg handleRemoteRequest (VERSION _) = diff --git a/debian/changelog b/debian/changelog index 098d865c2..e9d2558c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,9 @@ git-annex (5.20150328) UNRELEASED; urgency=medium * Prevent git-ls-files from double-expanding wildcards when an unexpanded wildcard is passed to a git-annex command like add or find. * Fix make build target. Thanks, Justin Geibel. + * Fix GETURLS in external special remote protocol to strip + downloader prefix from logged url info before checking for the + specified prefix. -- Joey Hess <id@joeyh.name> Fri, 27 Mar 2015 16:04:43 -0400 diff --git a/doc/bugs/GETURLS_doesn__39__t_return_URLs_if_prefix_is_provided.mdwn b/doc/bugs/GETURLS_doesn__39__t_return_URLs_if_prefix_is_provided.mdwn index f62649815..fe1bc1611 100644 --- a/doc/bugs/GETURLS_doesn__39__t_return_URLs_if_prefix_is_provided.mdwn +++ b/doc/bugs/GETURLS_doesn__39__t_return_URLs_if_prefix_is_provided.mdwn @@ -33,3 +33,5 @@ DATALAD_LOGLEVEL=1 DATALAD_LOGTARGET=stderr tools/testing/make_test_repo archive # End of transcript or log. """]] + +> [[fixed|done]] --[[Joey]] |