Massive refactor of SFTP system now that it is deeply integrated with Wings
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user