From 1a5a2eb1b627378e66065f252594ff677891fccc Mon Sep 17 00:00:00 2001 From: vincentdarley Date: Thu, 10 Feb 2005 17:09:42 +0000 Subject: fix to test suite failures --- ChangeLog | 5 +++++ generic/tclFileName.c | 15 ++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a83b16f..912d754 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-02-10 Vince Darley + + * generic/tclFileName.c: fix for test failures introduced + on 2005-01-17 [Bug 1119092] + 2005-02-10 Donal K. Fellows * doc/binary.n: Made the documentation of sign bit masking and diff --git a/generic/tclFileName.c b/generic/tclFileName.c index cf487a5..5b4430c 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclFileName.c,v 1.62 2005/01/21 17:42:14 andreas_kupries Exp $ + * RCS: @(#) $Id: tclFileName.c,v 1.63 2005/02/10 17:09:49 vincentdarley Exp $ */ #include "tclInt.h" @@ -2288,11 +2288,20 @@ DoGlob(interp, matchesObj, separators, pathPtr, flags, pattern, types) } else { joinedPtr = Tcl_DuplicateObj(pathPtr); if (strchr(separators, pattern[0]) == NULL) { - /* The current prefix must end in a separator */ + /* + * The current prefix must end in a separator, unless + * this is a volume-relative path. In particular + * globbing in Windows shares, when not using -dir + * or -path, e.g. 'glob //machine/share/subdir/*' + * requires adding a separator here. This behaviour + * is not currently tested for in the test suite. + */ int len; CONST char *joined = Tcl_GetStringFromObj(joinedPtr,&len); if (strchr(separators, joined[len-1]) == NULL) { - Tcl_AppendToObj(joinedPtr, "/", 1); + if (Tcl_FSGetPathType(pathPtr) != TCL_PATH_VOLUME_RELATIVE) { + Tcl_AppendToObj(joinedPtr, "/", 1); + } } } Tcl_AppendToObj(joinedPtr, pattern, p-pattern); -- cgit v0.12