aboutsummaryrefslogtreecommitdiff
path: root/hotline/tracker_test.go
diff options
context:
space:
mode:
authorJeff Halter <868228+jhalter@users.noreply.github.com>2026-07-09 18:28:47 -0700
committerJeff Halter <868228+jhalter@users.noreply.github.com>2026-07-09 18:28:47 -0700
commit631b7f1f99c2ff6295152210640a2f9b2c4f5a88 (patch)
treec9bc509610835ad5283928a4b317aa4ed228e13d /hotline/tracker_test.go
parent4bd4c14daff4cb8807a91305239cae1e8544f276 (diff)
Resolve FileRoot per storage backend to keep object keys host-independent
LoadConfig unconditionally rewrote a relative FileRoot to an absolute path under the config dir. R2FileStore.key() then embedded that local path in every object key (e.g. Users/jhalter/.../config/Files/...), so bucket contents were tied to the host's directory layout and orphaned by moving the config dir or pointing another server at the bucket. FileRoot is a path within the selected file store's namespace, so only the backend selection in main knows how to resolve it: the os backend resolves relative values against the config dir as before, while the memory and r2 backends keep the configured value verbatim, yielding portable keys like Files/foo.txt. An absolute FileRoot combined with an object-store backend now logs a warning. WithConfig copies the config struct, so the option is appended after the backend selection mutates FileRoot rather than before.
Diffstat (limited to 'hotline/tracker_test.go')
0 files changed, 0 insertions, 0 deletions