parent
42a8c19aae
commit
7d8765a937
12 changed files with 49 additions and 15 deletions
|
@ -455,12 +455,22 @@ func (r *SFTP) List(ctx context.Context, t restic.FileType) <-chan string {
|
|||
go func() {
|
||||
defer close(ch)
|
||||
|
||||
walker := r.c.Walk(r.Basedir(t))
|
||||
basedir, subdirs := r.Basedir(t)
|
||||
walker := r.c.Walk(basedir)
|
||||
for walker.Step() {
|
||||
if walker.Err() != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
if walker.Path() == basedir {
|
||||
continue
|
||||
}
|
||||
|
||||
if walker.Stat().IsDir() && !subdirs {
|
||||
walker.SkipDir()
|
||||
continue
|
||||
}
|
||||
|
||||
if !walker.Stat().Mode().IsRegular() {
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue