summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclFileName.c15
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 <vincentdarley@users.sourceforge.net>
+
+ * generic/tclFileName.c: fix for test failures introduced
+ on 2005-01-17 [Bug 1119092]
+
2005-02-10 Donal K. Fellows <donal.k.fellows@man.ac.uk>
* 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);