Skip to content

Fish: Fix sh implementation

It seems that 'sh' (fallback) implementation for fish protocol was broken for ages (the first committed version back in 2002 already had that issue): fish.pl implementation of LIST (and STAT) replies with:

  • the number of entries
  • ### 100
  • the entires
  • ### 200

The C++ counterpart expected this format but the fallback (shell) implementation replies with:

  • the number of entries
  • the entires
  • ### 000

The protocol specification says that a command should succeed with code 200 (or 2xx) and ### 000 in the spec text is just a placeholder for the code value.

Adjust the result code and add the expected "preliminary positive" code after the number of entries to fix the issue.

Test plan:

  • Open Dolphin and browse a server without installed perl (a postmarketOS device, for an instance). I used URL fish://172.16.42.1/usr/share.
  • Try to open, edit, and upload a document to the server.

Before the patches, the server content was not available. After the patches everything work as expected. The patches fixes fish protocol for postmarketOS and many other perl-less distributions.

I also tested a connection to server with perl (so there is no regression).

BUG: 345047

FIXED-IN: 20.08.3

Merge request reports