diff options
Diffstat (limited to 'Remote/External.hs')
-rw-r--r-- | Remote/External.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Remote/External.hs b/Remote/External.hs index 0579400ed..7dd1736e4 100644 --- a/Remote/External.hs +++ b/Remote/External.hs @@ -223,6 +223,10 @@ handleRequest' lck external req mp responsehandler setUrlPresent (externalUUID external) key url handleRemoteRequest (SETURLMISSING key url) = setUrlMissing (externalUUID external) key url + handleRemoteRequest (SETURIPRESENT key uri) = + withurl (SETURLPRESENT key) uri + handleRemoteRequest (SETURIMISSING key uri) = + withurl (SETURLMISSING key) uri handleRemoteRequest (GETURLS key prefix) = do mapM_ (send . VALUE . fst . getDownloader) =<< getUrlsWithPrefix key prefix @@ -242,6 +246,9 @@ handleRequest' lck external req mp responsehandler } where base = replace "/" "_" $ fromUUID (externalUUID external) ++ "-" ++ setting + + withurl mk uri = handleRemoteRequest $ mk $ + setDownloader (show uri) OtherDownloader sendMessage :: Sendable m => ExternalLock -> External -> m -> Annex () sendMessage lck external m = |