aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/pkg/sftp/client.go
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2016-10-08 16:02:50 -0500
committerNiall Sheridan <nsheridan@gmail.com>2016-10-08 16:02:50 -0500
commitbaf7141d1dd0f99d561a2197a909c66dd389809d (patch)
tree92c176f713b0b28893344261b1e567db5e30ba79 /vendor/github.com/pkg/sftp/client.go
parent696aebffe56853345d679d4d2b3051236423c6db (diff)
Update dependencies
Diffstat (limited to 'vendor/github.com/pkg/sftp/client.go')
-rw-r--r--vendor/github.com/pkg/sftp/client.go7
1 files changed, 1 insertions, 6 deletions
diff --git a/vendor/github.com/pkg/sftp/client.go b/vendor/github.com/pkg/sftp/client.go
index 41f1063..e95bbab 100644
--- a/vendor/github.com/pkg/sftp/client.go
+++ b/vendor/github.com/pkg/sftp/client.go
@@ -490,18 +490,13 @@ func (c *Client) Join(elem ...string) string { return path.Join(elem...) }
// is not empty.
func (c *Client) Remove(path string) error {
err := c.removeFile(path)
- switch err := err.(type) {
- case *StatusError:
+ if err, ok := err.(*StatusError); ok {
switch err.Code {
// some servers, *cough* osx *cough*, return EPERM, not ENODIR.
// serv-u returns ssh_FX_FILE_IS_A_DIRECTORY
case ssh_FX_PERMISSION_DENIED, ssh_FX_FAILURE, ssh_FX_FILE_IS_A_DIRECTORY:
return c.removeDirectory(path)
- default:
- return err
}
- default:
- return err
}
return err
}