fix handling of ERROR in response to CHECKPRESENT
That error is now rethrown on the client, so it will be displayed. For example: $ git-annex fsck x --fast --from AMS-dir fsck x (special remote reports: directory /home/joey/tmp/bench2/dir is not accessible) failed No protocol version check is needed. Because in order to talk to a proxied special remote, the client has to be running the upcoming git-annex release. Which has this fix in it.
This commit is contained in:
parent
d3c75c003a
commit
a6ea057f6b
3 changed files with 23 additions and 10 deletions
|
@ -81,7 +81,7 @@ proxySpecialRemote protoversion r ihdl ohdl endv = go
|
|||
tryNonAsync (Remote.checkPresent r k) >>= \case
|
||||
Right True -> sendmessage SUCCESS
|
||||
Right False -> sendmessage FAILURE
|
||||
Left err -> sendmessage (ERROR (show err))
|
||||
Left err -> propagateerror err
|
||||
go
|
||||
Just (LOCKCONTENT _) -> do
|
||||
-- Special remotes do not support locking content.
|
||||
|
@ -119,3 +119,6 @@ proxySpecialRemote protoversion r ihdl ohdl endv = go
|
|||
|
||||
sendmessage m = liftIO $ atomically $ putTMVar ihdl (Right m)
|
||||
sendbytestring b = liftIO $ atomically $ putTMVar ihdl (Left b)
|
||||
|
||||
propagateerror err = sendmessage $ ERROR $
|
||||
"proxied special remote reports: " ++ show err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue