Massive refactor of SFTP system now that it is deeply integrated with Wings

This commit is contained in:
Dane Everitt
2021-01-10 14:25:39 -08:00
parent 96256ac63e
commit c228acaafc
7 changed files with 226 additions and 367 deletions

View File

@@ -49,10 +49,8 @@ func (e *Error) Code() ErrorCode {
// Checks if the given error is one of the Filesystem errors.
func IsFilesystemError(err error) (*Error, bool) {
if e := errors.Unwrap(err); e != nil {
err = e
}
if fserr, ok := err.(*Error); ok {
var fserr *Error
if errors.As(err, &fserr) {
return fserr, true
}
return nil, false