* Fix prjfile for absolute path

This commit is contained in:
pancake 2011-03-10 21:38:56 +01:00
parent f564ced79e
commit 40bb699f20
2 changed files with 7 additions and 4 deletions

View File

@ -2321,7 +2321,7 @@ static int var_cmd(RCore *core, const char *str) {
eprintf ("Can not find variable in: '%s'\n", str);
} else eprintf ("Unknown variable in: '%s'\n", str);
return R_FALSE;
} else eprintf ("Missing argument for a%c\n");
} else eprintf ("Missing argument\n");
break;
}
str++;

View File

@ -1,4 +1,4 @@
/* radare - LGPL - Copyright 2010 pancake<nopcode.org> */
/* radare - LGPL - Copyright 2010-2011 pancake<nopcode.org> */
#include <r_types.h>
#include <r_list.h>
@ -7,8 +7,11 @@
static char *r_core_project_file(const char *file) {
char buf[128];
snprintf (buf, sizeof (buf), ".radare2/rdb/%s", file);
return r_str_home (buf);
if (!strchr (file, '/')) {
snprintf (buf, sizeof (buf), ".radare2/rdb/%s", file);
return r_str_home (buf);
}
return strdup (file);
}
//TODO: Don't try mkdir rdb if mdkir .radare2 fails. (Maybe R_TRUFAE??)