compilation fix and cross-filesystem boundary glob fix
authorVince Darley <vincentdarley@sourceforge.net>
Thu, 1 Apr 2004 11:12:13 +0000 (11:12 +0000)
committerVince Darley <vincentdarley@sourceforge.net>
Thu, 1 Apr 2004 11:12:13 +0000 (11:12 +0000)
ChangeLog
generic/vfs.c

index bc7c8bb42bc27d5220cd4dc88d5cd676fe62f7d9..836a0ae09c90cb699d35b9fe4e215792e9889ac3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2003-04-01  Vince Darley <vincentdarley@sourceforge.net>
+
+        * generic/vfs.c: added #include tclInt.h given recent Tcl
+        changes which broke compilation.
+
+        Fix to privately reported vfs bug with 'glob -type d -dir .  *'
+        across a vfs boundary.  No tests for this are currently possible
+        without effectively moving tclvfs into Tcl's test suite.
+
 2003-11-10  Jeff Hobbs  <jeffh@ActiveState.com>
 
        * configure: regen
index 77d222167b219e063abf4943449c3c3da5677cb7..e02bc085e7961f658f0c81e60e78aab6b7a842f8 100644 (file)
@@ -21,6 +21,7 @@
 
 #include <tcl.h>
 /* Required to access the 'stat' structure fields */
+#include "tclInt.h"
 #include "tclPort.h"
 
 /*
@@ -1471,6 +1472,14 @@ VfsMatchInDirectory(
 
        prefix = Tcl_GetStringFromObj(Tcl_FSGetNormalizedPath(NULL, dirPtr), 
                                      &len);
+       if (prefix[len-1] == '/') {
+           /* 
+            * It's a root directory; we must subtract one for
+            * our comparisons below
+            */
+           len--;
+       }
+
        Tcl_MutexLock(&vfsMountsMutex);
 
        /* Build list of mounts */