Browse Source

punk::path 0.2.1: filter '.' and '..' by tail in treefilenames hidden-dir glob to fix non-Windows recursion loop

master
Julian Noble 1 week ago
parent
commit
05b977fb3d
  1. 3
      src/modules/punk/path-999999.0a1.0.tm
  2. 3
      src/modules/punk/path-buildversion.txt

3
src/modules/punk/path-999999.0a1.0.tm

@ -1255,7 +1255,8 @@ namespace eval punk::path {
#also match hidden directories
if {![catch {glob -nocomplain -dir $opt_dir -types {hidden d} *} hidden_dirdirs]} {
foreach h $hidden_dirdirs {
switch -- $h {
#glob -dir returns full paths; compare the tail so '.' and '..' are filtered on all platforms
switch -- [file tail $h] {
"." - ".." {continue}
default {
if {$h ni $dirdirs} {

3
src/modules/punk/path-buildversion.txt

@ -1,5 +1,6 @@
0.2.0
0.2.1
#First line must be a semantic version number
#all other lines are ignored.
#0.2.1 - treefilenames: filter '.' and '..' by tail in the hidden-directory glob so recursion does not loop on non-Windows platforms
#0.2.0 - treefilenames now matches hidden files and recurses into hidden directories on all platforms
#0.2.0 - added PUNKARGS documentation for punk::path::relative

Loading…
Cancel
Save