char *yaz_filepath_resolve(const char *fname, const char *path,
const char *base, char *fullpath)
{
- for(;;)
+ if (path && *path == '\0')
+ path = 0;
+ for (;;)
{
struct stat stat_buf;
size_t slen = 0;
YAZ_CHECK(!yaz_filepath_resolve("does_not_exist", ".", 0, fullpath));
YAZ_CHECK(yaz_filepath_resolve("test_tpath", 0, 0, fullpath));
- YAZ_CHECK(!yaz_filepath_resolve("test_tpath", "", 0, fullpath));
+ YAZ_CHECK(yaz_filepath_resolve("test_tpath", "", 0, fullpath));
YAZ_CHECK(yaz_filepath_resolve("test_tpath", ".", 0, fullpath));
YAZ_CHECK(!yaz_filepath_resolve("test_tpath", "unknown_dir", 0, fullpath));