I'm not sure if this fixes fpath completely, but it does fix a libgit EINVAL when running cargo new my-pkg.
cargo new my-pkg