mirror of
https://github.com/rclone/rclone.git
synced 2024-12-22 23:22:08 +01:00
test_all: fix -clean so it works on remotes with paths
This commit is contained in:
parent
b9de37af80
commit
100acc570a
@ -9,6 +9,7 @@ import (
|
||||
"regexp"
|
||||
|
||||
"github.com/rclone/rclone/fs"
|
||||
"github.com/rclone/rclone/fs/fspath"
|
||||
"github.com/rclone/rclone/fs/list"
|
||||
"github.com/rclone/rclone/fs/operations"
|
||||
)
|
||||
@ -39,7 +40,7 @@ func cleanFs(ctx context.Context, remote string, cleanup bool) error {
|
||||
}
|
||||
err = entries.ForDirError(func(dir fs.Directory) error {
|
||||
dirPath := dir.Remote()
|
||||
fullPath := remote + dirPath
|
||||
fullPath := fspath.JoinRootPath(remote, dirPath)
|
||||
if MatchTestRemote.MatchString(dirPath) {
|
||||
if *dryRun {
|
||||
log.Printf("Not Purging %s - -dry-run", fullPath)
|
||||
|
Loading…
Reference in New Issue
Block a user