diff --git a/librz/util/version.c b/librz/util/version.c index 989f48ba09..4dc3993626 100644 --- a/librz/util/version.c +++ b/librz/util/version.c @@ -20,7 +20,12 @@ * \return The saved git commit hash as a string, or NULL if it's not available. */ RZ_API RZ_OWN char *rz_version_gittip() { - char *gittip_pathname = rz_str_newf("%s" RZ_SYS_DIR "gittip", rz_path_bindir()); + char *datadir = rz_path_system(RZ_DATADIR); + if (!datadir) { + return NULL; + } + char *gittip_pathname = rz_file_path_join(datadir, "gittip"); + free(datadir); if (!gittip_pathname) { return NULL; } diff --git a/meson.build b/meson.build index f3b61fde2a..f2db5b6b15 100644 --- a/meson.build +++ b/meson.build @@ -525,7 +525,7 @@ if git_exe.found() and fs.exists('.git') output: 'gittip', command: [py3_exe, git_exe_repo_py, git_exe, repo, 'rev-parse', 'HEAD'], install: true, - install_dir: rizin_bindir + install_dir: rizin_datdir_rz ) endif