`remap-path-prefix` doesn't seem to work for .cargo dir

In my .cargo/config file, I have:

rustflags = ["-Z", "remap-path-prefix-from=/home/me", "-Z", "remap-path-prefix-to=/foo/bar"]

But when I do strings target/release/myexe | rg '/home/me' or rg -a '/home/me' target/release/myexe, it still shows the same paths containing /home/me/.cargo (and it's subdirs) as without these rustflags. And it shows no matches for /foo/bar, so these flags seem to have no effect.

Any idea why?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.