mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 06:46:34 +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",
|
||||
"repository": "https://github.com/pkg/sftp",
|
||||
"revision": "a71e8f580e3b622ebff585309160b1cc549ef4d2",
|
||||
"revision": "8197a2e580736b78d704be0fc47b2324c0591a32",
|
||||
"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.
|
||||
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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user