mirror of
https://github.com/rclone/rclone.git
synced 2024-11-23 02:34:40 +08:00
fstest: don't error out if the target was not found at end of run
This commit is contained in:
parent
fa4a25a73b
commit
ebd7780188
|
@ -127,7 +127,7 @@ func NewRun(t *testing.T) *Run {
|
|||
*r = *oneRun
|
||||
r.cleanRemote = func() {
|
||||
var toDelete dirsToRemove
|
||||
require.NoError(t, fs.Walk(r.Fremote, "", true, -1, func(dirPath string, entries fs.DirEntries, err error) error {
|
||||
err := fs.Walk(r.Fremote, "", true, -1, func(dirPath string, entries fs.DirEntries, err error) error {
|
||||
if err != nil {
|
||||
if err == fs.ErrorDirNotFound {
|
||||
return nil
|
||||
|
@ -146,7 +146,11 @@ func NewRun(t *testing.T) *Run {
|
|||
}
|
||||
}
|
||||
return nil
|
||||
}))
|
||||
})
|
||||
if err == fs.ErrorDirNotFound {
|
||||
return
|
||||
}
|
||||
require.NoError(t, err)
|
||||
sort.Sort(toDelete)
|
||||
for _, dir := range toDelete {
|
||||
err := r.Fremote.Rmdir(dir)
|
||||
|
|
Loading…
Reference in New Issue
Block a user