mirror of
https://github.com/octoleo/restic.git
synced 2024-11-29 16:23:59 +00:00
Update github.com/pkg/sftp
This commit is contained in:
parent
daae3500dd
commit
3d55b54f3d
2
vendor/manifest
vendored
2
vendor/manifest
vendored
@ -40,7 +40,7 @@
|
|||||||
{
|
{
|
||||||
"importpath": "github.com/pkg/sftp",
|
"importpath": "github.com/pkg/sftp",
|
||||||
"repository": "https://github.com/pkg/sftp",
|
"repository": "https://github.com/pkg/sftp",
|
||||||
"revision": "a71e8f580e3b622ebff585309160b1cc549ef4d2",
|
"revision": "8197a2e580736b78d704be0fc47b2324c0591a32",
|
||||||
"branch": "master"
|
"branch": "master"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
7
vendor/src/github.com/pkg/sftp/client.go
vendored
7
vendor/src/github.com/pkg/sftp/client.go
vendored
@ -490,18 +490,13 @@ func (c *Client) Join(elem ...string) string { return path.Join(elem...) }
|
|||||||
// is not empty.
|
// is not empty.
|
||||||
func (c *Client) Remove(path string) error {
|
func (c *Client) Remove(path string) error {
|
||||||
err := c.removeFile(path)
|
err := c.removeFile(path)
|
||||||
switch err := err.(type) {
|
if err, ok := err.(*StatusError); ok {
|
||||||
case *StatusError:
|
|
||||||
switch err.Code {
|
switch err.Code {
|
||||||
// some servers, *cough* osx *cough*, return EPERM, not ENODIR.
|
// some servers, *cough* osx *cough*, return EPERM, not ENODIR.
|
||||||
// serv-u returns ssh_FX_FILE_IS_A_DIRECTORY
|
// serv-u returns ssh_FX_FILE_IS_A_DIRECTORY
|
||||||
case ssh_FX_PERMISSION_DENIED, ssh_FX_FAILURE, ssh_FX_FILE_IS_A_DIRECTORY:
|
case ssh_FX_PERMISSION_DENIED, ssh_FX_FAILURE, ssh_FX_FILE_IS_A_DIRECTORY:
|
||||||
return c.removeDirectory(path)
|
return c.removeDirectory(path)
|
||||||
default:
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
default:
|
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user