]> git.hungrycats.org Git - bees/commit
main: the base directory for `--strip-paths` should be root_fd, not cwd
authorZygo Blaxell <bees@furryterror.org>
Mon, 27 Jan 2025 16:39:36 +0000 (11:39 -0500)
committerZygo Blaxell <bees@furryterror.org>
Fri, 7 Feb 2025 03:42:15 +0000 (22:42 -0500)
commit440740201a46ffbc3db181d1984dfc85155f9b52
tree238bda893e4edaa77c36e5c72efbb3a972e9cc8d
parentf6908420adcf3fbafef8bbde8a25f8bac65424b6
main: the base directory for `--strip-paths` should be root_fd, not cwd

The cwd is where core dumps and various profiling and verification
libraries want to write their data, whereas root_fd is the root of the
target filesystem.  These are often intentionally different.  When
they are different, `--strip-paths` sets the wrong prefix to strip
from paths.

Once the root fd has been established, we can set the path prefix to
the string prefix that we'll get from future calls to `name_fd`.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
src/bees.cc