Skip to content

Commit

Permalink
Fix RFile.new API
Browse files Browse the repository at this point in the history
  • Loading branch information
radare committed Dec 27, 2024
1 parent de46f7f commit 1105ab4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions libr/util/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,12 @@ R_API char *r_file_new(const char *root, ...) {
} else {
r_strbuf_append (sb, root);
}
if (!r_str_endswith (r_strbuf_get (sb), R_SYS_DIR)) {
r_strbuf_append (sb, R_SYS_DIR);
}
const char *arg = va_arg (ap, char *);
if (arg) {
if (!r_str_endswith (r_strbuf_get (sb), R_SYS_DIR)) {
r_strbuf_append (sb, R_SYS_DIR);
}
}
while (arg) {
if (!r_str_endswith (r_strbuf_get (sb), R_SYS_DIR)) {
r_strbuf_append (sb, R_SYS_DIR);
Expand Down

0 comments on commit 1105ab4

Please sign in to comment.