From: Vince Darley Date: Thu, 1 Apr 2004 11:12:13 +0000 (+0000) Subject: compilation fix and cross-filesystem boundary glob fix X-Git-Tag: vfs-1-4~104 X-Git-Url: https://privyetmir.co.uk/gitweb.cgi?a=commitdiff_plain;h=d945086048f33dbcf00971f524ac25fa1a0a2df9;p=tclvfs compilation fix and cross-filesystem boundary glob fix --- diff --git a/ChangeLog b/ChangeLog index bc7c8bb..836a0ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2003-04-01 Vince Darley + + * 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 * configure: regen diff --git a/generic/vfs.c b/generic/vfs.c index 77d2221..e02bc08 100644 --- a/generic/vfs.c +++ b/generic/vfs.c @@ -21,6 +21,7 @@ #include /* 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 */