From ad38e19578815fc064ea0a5f455fa8beffc99e63 Mon Sep 17 00:00:00 2001 From: Danny Mayer Date: Wed, 11 Jul 2001 04:32:15 +0000 Subject: [PATCH] Fix isabsolute for absolute path names --- lib/isc/win32/file.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/isc/win32/file.c b/lib/isc/win32/file.c index 64054e3642..6219aee546 100644 --- a/lib/isc/win32/file.c +++ b/lib/isc/win32/file.c @@ -15,7 +15,7 @@ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: file.c,v 1.13 2001/07/10 17:31:05 gson Exp $ */ +/* $Id: file.c,v 1.14 2001/07/11 04:32:15 mayer Exp $ */ #include @@ -384,12 +384,12 @@ isc_boolean_t isc_file_isabsolute(const char *filename) { REQUIRE(filename != NULL); /* - * The forms \path, \\computer\shar\path and c:\path are all - * considered absolute. + * Look for c:\path\... style or \\computer\shar\path... + * the UNC style file specs */ - if (filename[0] == '\\') + if ((filename[0] == '\\') && (filename[1] == '\\')) return (ISC_TRUE); - if (filename[0] != '\0' && filename[1] == ':' && filename[2] == '\\') + if (isalpha(filename[0]) != 0 && filename[1] == ':' && filename[2] == '\\') return (ISC_TRUE); return (ISC_FALSE); }