From 3d55b54f3d04ab3542f14a31d67ac9f29211c7c1 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Thu, 15 Sep 2016 22:31:18 +0200 Subject: [PATCH] Update github.com/pkg/sftp --- vendor/manifest | 2 +- vendor/src/github.com/pkg/sftp/client.go | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/vendor/manifest b/vendor/manifest index aa525278b..3dc900703 100644 --- a/vendor/manifest +++ b/vendor/manifest @@ -40,7 +40,7 @@ { "importpath": "github.com/pkg/sftp", "repository": "https://github.com/pkg/sftp", - "revision": "a71e8f580e3b622ebff585309160b1cc549ef4d2", + "revision": "8197a2e580736b78d704be0fc47b2324c0591a32", "branch": "master" }, { diff --git a/vendor/src/github.com/pkg/sftp/client.go b/vendor/src/github.com/pkg/sftp/client.go index 41f10639c..e95bbab47 100644 --- a/vendor/src/github.com/pkg/sftp/client.go +++ b/vendor/src/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 }