diff --git a/librz/util/file.c b/librz/util/file.c index 69e6c4508aa..17ee1f89904 100644 --- a/librz/util/file.c +++ b/librz/util/file.c @@ -1314,6 +1314,9 @@ RZ_API RzList /**/ *rz_file_globsearch(const char *_globbed_path, int ma RZ_API RZ_OWN char *rz_file_path_join(RZ_NONNULL const char *s1, RZ_NULLABLE const char *s2) { rz_return_val_if_fail(s1, NULL); + if (s1[0] == 0) { + return strdup(s2); + } if (!s2) { return strdup(s1); }