mirror of
https://github.com/restic/restic.git
synced 2025-08-12 14:47:41 +00:00
local/sftp: Handling non-existing dirs in List()
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user