VictoriaMetrics/lib/backup
Aliaksandr Valialkin a2ad5ce773
lib/backup: consistently use path.Join() when constructing paths for s3, gs and azblob
E.g. replace `fs.Dir + filePath` with `path.Join(fs.Dir, filePath)`

The fs.Dir is guaranteed to end with slash - see Init() functions.
The filePath may start with slash. If it starts with slash, then `fs.Dir + filePath` constructs
an incorrect path with double slashes.
path.Join() properly substitutes duplicate slashes with a single slash in this case.

While at it, also substitute incorrect usage of filepath.Join() with path.Join()
for constructing paths to object storage systems, which expect forward slashes in paths.
filepath.Join() substittues forward slashes with backslashes on Windows, so this may break
creating or managing backups from Windows.

This is a follow-up for 0399367be602b577baf6a872ca81bf0f99ba401b
Updates https://github.com/VictoriaMetrics/VictoriaMetrics-enterprise/pull/719
2023-12-04 10:45:29 +02:00
..
actions lib/backup: properly copy parts.json files inside indexdb directory additional to data directory 2023-09-19 00:40:16 +02:00
azremote lib/backup: consistently use path.Join() when constructing paths for s3, gs and azblob 2023-12-04 10:45:29 +02:00
backupnames fix removing storage data dir before restoring from backup (#598) 2023-07-06 22:32:12 -07:00
common lib/backup: consistently use path.Join() when constructing paths for s3, gs and azblob 2023-12-04 10:45:29 +02:00
fscommon lib/backup/common: consistently use canonical path with / directory separators at Part.Path 2023-09-19 00:37:36 +02:00
fslocal lib/backup/common: consistently use canonical path with / directory separators at Part.Path 2023-09-19 00:37:36 +02:00
fsnil lib/backup: add MustStop() method for all remote filesystems 2020-10-09 15:32:13 +03:00
fsremote lib/backup/common: consistently use canonical path with / directory separators at Part.Path 2023-09-19 00:37:36 +02:00
gcsremote lib/backup: consistently use path.Join() when constructing paths for s3, gs and azblob 2023-12-04 10:45:29 +02:00
s3remote lib/backup: consistently use path.Join() when constructing paths for s3, gs and azblob 2023-12-04 10:45:29 +02:00