local/sftp: Handling non-existing dirs in List()
This commit is contained in:
parent
6a34e0d10f
commit
577faa7570
2 changed files with 12 additions and 1 deletions
|
@ -425,6 +425,10 @@ func (r *SFTP) List(ctx context.Context, t restic.FileType, fn func(restic.FileI
|
|||
walker := r.c.Walk(basedir)
|
||||
for walker.Step() {
|
||||
if walker.Err() != nil {
|
||||
if r.IsNotExist(walker.Err()) {
|
||||
debug.Log("ignoring non-existing directory")
|
||||
return nil
|
||||
}
|
||||
return walker.Err()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue