# HG changeset patch # User jld # Date 1226319746 0 # Node ID f4ceaa469de9bc37e4a49b62c1c3a65209410bff # Parent b9088f7fbbd3710d33bf855e6883e4bb419d86ef * interp.cxx: Ignore file and directory names with a leading period. diff --git a/host/libcdl/ChangeLog b/host/libcdl/ChangeLog --- a/host/libcdl/ChangeLog +++ b/host/libcdl/ChangeLog @@ -27,6 +27,16 @@ 2008-08-14 Bart Veer + + * interp.cxx (locate_files): Ignore file names with a leading period + (such as ".cvsignore"). + +2005-11-11 John Dallaway + + * interp.cxx (locate_subdirs): Ignore directory names with a leading + period (such as ".svn"). + 2004-06-23 John Dallaway * interp.cxx (locate_subdirs): Avoid use of a trailing period in diff --git a/host/libcdl/interp.cxx b/host/libcdl/interp.cxx --- a/host/libcdl/interp.cxx +++ b/host/libcdl/interp.cxx @@ -10,7 +10,7 @@ //####COPYRIGHTBEGIN#### // // ---------------------------------------------------------------------------- -// Copyright (C) 2004 eCosCentric Limited +// Copyright (C) 2004, 2005, 2008 eCosCentric Limited // Copyright (C) 2002 Bart Veer // Copyright (C) 1999, 2000, 2001 Red Hat, Inc. // @@ -1179,7 +1179,8 @@ set result {} foreach entry [glob -nocomplain -- $pattern] { \n\ if ([file isdirectory $entry]) { \n\ set entry [file tail $entry] \n\ - if {($entry != \"CVS\") && ($entry != \"cvs\")} { \n\ + if {($entry != \"CVS\") && ($entry != \"cvs\") && \ + ([string index $entry 0] != \".\")} { \n\ lappend result $entry \n\ } \n\ } \n\ @@ -1250,7 +1251,10 @@ foreach entry [glob -nocomplain -- $patt if ([file isdirectory $entry]) { \n\ continue \n\ } \n\ - lappend result [file tail $entry] \n\ + set entry [file tail $entry] \n\ + if {[string index $entry 0] != \".\"} { \n\ + lappend result $entry \n\ + } \n\ } \n\ return $result \n\ ";