Don't translate StatusPacket to os.Err(NotExist|Permission)#633
Don't translate StatusPacket to os.Err(NotExist|Permission)#633puellanivis merged 1 commit intopkg:dev-v2from
Conversation
Doing this loses potentially useful information for the client. They should instead check with errors.Is(err, fs.ErrNotExist), etc.; the StatusPacket type has an Is method for this already.
|
Hm… 🤔 I can’t see any reason against this. It’s also for the And as noted, unlike The openssh-portable sftp-server does not return any more useful information in the error message for these, but other servers might (like ours). |
|
IIRC, the translation to os.ErrNotExist was actually a breaking change introduced in a minor revision, before errors.Is was a thing. |
|
It seems was introduced before this package even released as Regardless, we have the better option now, and v2 should support the new way rather than keep an old way. |
Doing this loses potentially useful information for the client. They should instead check with errors.Is(err, fs.ErrNotExist), etc.; the StatusPacket type has an Is method for this already.