fix display when proxied GET yields ERROR

The error message is not displayed to the use, but this mirrors the
behavior when a regular get from a special remote fails. At least now
there is not a protocol error.
This commit is contained in:
Joey Hess 2024-07-01 11:19:02 -04:00
parent dce3848ad8
commit fa5e7463eb
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 21 additions and 16 deletions

View file

@ -114,7 +114,7 @@ proxySpecialRemote protoversion r ihdl ohdl owaitv endv = go
liftIO $ sendmessage $
ERROR "NOTIFYCHANGE unsupported for a special remote"
go
Just _ -> giveup "protocol error"
Just _ -> giveup "protocol error M"
Nothing -> return ()
getnextmessageorend =
@ -167,9 +167,9 @@ proxySpecialRemote protoversion r ihdl ohdl owaitv endv = go
store
Just (VALIDITY Invalid) ->
return ()
_ -> giveup "protocol error"
_ -> giveup "protocol error N"
else store
_ -> giveup "protocol error"
_ -> giveup "protocol error O"
proxyget offset af k = withproxytmpfile k $ \tmpfile -> do
-- Don't verify the content from the remote,
@ -206,6 +206,6 @@ proxySpecialRemote protoversion r ihdl ohdl owaitv endv = go
receivemessage >>= \case
Just SUCCESS -> return ()
Just FAILURE -> return ()
Just _ -> giveup "protocol error"
Just _ -> giveup "protocol error P"
Nothing -> return ()