Commit Graph
3 Commits
Author SHA1 Message Date
kevin9327 e49f3350ab lib/version: only match a version string at the end of the base name
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.
2026-11-11 11:03:33 +00:00
Nick Craig-Wood 06f27384dd b2: fix versions and .files with no extension - fixes #5244 2021-05-17 16:20:29 +01:00
Dominik Mydlil c163e6b250 b2: factor version handling into lib/version
Standardizes the filename version tagging so that it can be used by any
backend.
2021-04-12 15:59:18 +01:00