Update github.com/pkg/sftp

This commit is contained in:
Alexander Neumann 2016-09-15 22:31:18 +02:00
parent daae3500dd
commit 3d55b54f3d
2 changed files with 2 additions and 7 deletions

2
vendor/manifest vendored
View file

@ -40,7 +40,7 @@
{
"importpath": "github.com/pkg/sftp",
"repository": "https://github.com/pkg/sftp",
"revision": "a71e8f580e3b622ebff585309160b1cc549ef4d2",
"revision": "8197a2e580736b78d704be0fc47b2324c0591a32",
"branch": "master"
},
{

View file

@ -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
}