X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftpath.c;h=80dca2da4f388548e11095ebe731fb9afd7df3fe;hb=9dba177f0fcfff591da208b07428ae3d45666084;hp=c743a6025bf7a0479b3c33ec666427ed9f4d4fb8;hpb=88d3bedf772316f87e1996f655ccf8d1e2589755;p=yaz-moved-to-github.git diff --git a/src/tpath.c b/src/tpath.c index c743a60..80dca2d 100644 --- a/src/tpath.c +++ b/src/tpath.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2010 Index Data + * Copyright (C) 1995-2011 Index Data * See the file LICENSE for details. */ /** @@ -14,7 +14,6 @@ #include #include -#include #include #include #if HAVE_SYS_TYPES_H @@ -75,7 +74,9 @@ size_t yaz_filepath_comp(const char **path_p, const char **comp) 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;