Added additional default value of dir.prefix on Windows (#9256)

This commit is contained in:
Paul I 2018-01-28 14:36:38 +03:00 committed by radare
parent fa80721ded
commit 71423f6fb9

View File

@ -2195,6 +2195,12 @@ R_API int r_core_config_init(RCore *core) {
/* dir.prefix is used in other modules, set it first */
{
char *pfx = r_sys_getenv("R2_PREFIX");
#if __WINDOWS__
char invoke_dir[MAX_PATH];
if (!pfx && r_sys_get_src_dir_w32 (invoke_dir)) {
pfx = strdup (invoke_dir);
}
#endif
if (!pfx) {
pfx = strdup (R2_PREFIX);
}