local/sftp: Handling non-existing dirs in List()

This commit is contained in:
Alexander Neumann 2018-04-10 21:35:30 +02:00
parent 6a34e0d10f
commit 577faa7570
2 changed files with 12 additions and 1 deletions

View file

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