From 47099466c0d8e8754b7b5252d63c15e370627b8d Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 21 Jan 2019 17:02:12 +0000 Subject: [PATCH] cache: Use walk.ListR for listing the temporary Fs. --- backend/cache/cache.go | 4 ++-- backend/cache/storage_persistent.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/backend/cache/cache.go b/backend/cache/cache.go index 6d6e39361..708b41fc8 100644 --- a/backend/cache/cache.go +++ b/backend/cache/cache.go @@ -1191,7 +1191,7 @@ func (f *Fs) Rmdir(dir string) error { } var queuedEntries []*Object - err = walk.Walk(f.tempFs, dir, true, -1, func(path string, entries fs.DirEntries, err error) error { + err = walk.ListR(f.tempFs, dir, true, -1, walk.ListObjects, func(entries fs.DirEntries) error { for _, o := range entries { if oo, ok := o.(fs.Object); ok { co := ObjectFromOriginal(f, oo) @@ -1287,7 +1287,7 @@ func (f *Fs) DirMove(src fs.Fs, srcRemote, dstRemote string) error { } var queuedEntries []*Object - err := walk.Walk(f.tempFs, srcRemote, true, -1, func(path string, entries fs.DirEntries, err error) error { + err := walk.ListR(f.tempFs, srcRemote, true, -1, walk.ListObjects, func(entries fs.DirEntries) error { for _, o := range entries { if oo, ok := o.(fs.Object); ok { co := ObjectFromOriginal(f, oo) diff --git a/backend/cache/storage_persistent.go b/backend/cache/storage_persistent.go index b6818c43a..f0d78d6c7 100644 --- a/backend/cache/storage_persistent.go +++ b/backend/cache/storage_persistent.go @@ -1023,7 +1023,7 @@ func (b *Persistent) ReconcileTempUploads(cacheFs *Fs) error { } var queuedEntries []fs.Object - err = walk.Walk(cacheFs.tempFs, "", true, -1, func(path string, entries fs.DirEntries, err error) error { + err = walk.ListR(cacheFs.tempFs, "", true, -1, walk.ListObjects, func(entries fs.DirEntries) error { for _, o := range entries { if oo, ok := o.(fs.Object); ok { queuedEntries = append(queuedEntries, oo)