version.Match searched the whole path for a version-like string, while
Add only puts one at the end of the base name and Remove only looks
there. So a current file such as notes-v2024-01-02-030405-678-final.txt
or anything under a directory named like dir-v2024-01-02-030405-678/
was treated as an old version.
In the s3 backend this made rclone cleanup on a versioned bucket delete
the current version of such files, and with --s3-versions NewObject
looked them up in the version listing.
Match now checks the base name returned by splitExt, the same place
Add and Remove use.
strings.ReplaceAll(s, old, new) is a wrapper function for
strings.Replace(s, old, new, -1). But strings.ReplaceAll is more
readable and removes the hardcoded -1.
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>