Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
config: fix system paths when relocating aerc
The following error occurs when packaging aerc for Conda: $ aerc /home/conda/.config/aerc/aerc.conf not found, installing the system default error: open /usr/share/aerc/aerc.conf: no such file or directory Conda installs aerc to a custom $PREFIX, so the config files will not be available in /usr/share/aerc. The above error occurs because aerc searches multiple paths for config paths and /usr/share/aerc happens to be the last path. The $PREFIX is first in the search list, so we would expect it to find the Conda installed files. By dumping out the contents of the search paths, I observed the $PREFIX paths are being searched but they are corrupted because their strings end with embedded NULLs (\x00). Conda builds aerc with a $PREFIX that is extremely long. Then when installing aerc, it does relocation by replacing the build $PREFIX with the final install $PREFIX, appending NULLs to fill out the string. go-lang does not use NULL-terminated strings, so these NULLs are preserved in the path. Trim any NULLs from the end of $PREFIX paths. Signed-off-by: Brandon Maier <[email protected]> Acked-by: Robin Jarry <[email protected]>
- Loading branch information