libssh: return the proper error for readdir problems

The code would return without setting sshc->actualcode or returning the
CURLcode error.

Reported by ZeroPath
Closes #19135
This commit is contained in:
Daniel Stenberg 2025-10-19 11:24:46 +02:00
parent 026498df43
commit 990a23bb97
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -613,6 +613,7 @@ static int myssh_in_SFTP_READDIR(struct Curl_easy *data,
if(result) {
myssh_to(data, sshc, SSH_STOP);
sshc->actualcode = result;
return SSH_NO_ERROR;
}