X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftpath.c;h=deaf6f4f150281fcd4ba4c507bf9be52bbe08412;hb=03dccce903176e61f889b1558834aa5a09f9f8c0;hp=900552eadccf69ea3d6a57b0701aaed7b46d6857;hpb=17144b85fb59bb8e0bdf1f8f634c339d88baf069;p=yaz-moved-to-github.git diff --git a/src/tpath.c b/src/tpath.c index 900552e..deaf6f4 100644 --- a/src/tpath.c +++ b/src/tpath.c @@ -1,5 +1,5 @@ /* This file is part of the YAZ toolkit. - * Copyright (C) 1995-2011 Index Data + * Copyright (C) 1995-2012 Index Data * See the file LICENSE for details. */ /** @@ -76,6 +76,8 @@ char *yaz_filepath_resolve(const char *fname, const char *path, { if (path && *path == '\0') path = 0; + if (strchr("/\\", *fname)) + path = 0; for (;;) { struct stat stat_buf; @@ -129,7 +131,8 @@ int yaz_is_abspath(const char *p) #ifdef WIN32 if (*p == '\\') return 1; - if (*p && p[1] == ':' && isalpha(*p)) + if (*p && p[1] == ':' && + ((*p >= 'A' && *p <= 'Z') || (*p >= 'a' && *p <= 'z'))) return 1; #endif return 0;