changeset 2592:f4ceaa469de9

* interp.cxx: Ignore file and directory names with a leading period.
author jld
date Mon, 10 Nov 2008 12:22:26 +0000
parents b9088f7fbbd3
children 9c68cbb6424d
files host/libcdl/ChangeLog host/libcdl/interp.cxx
diffstat 2 files changed, 17 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/host/libcdl/ChangeLog
+++ b/host/libcdl/ChangeLog
@@ -27,6 +27,16 @@ 2008-08-14  Bart Veer  <bartv@ecoscentri
 	config.cxx, component.cxx, cdlmisc.cxx, cdlcore.hxx, cdl.hxx,
 	build.cxx: fix various compiler warnings.
 
+2008-08-14  John Dallaway  <jld@ecoscentric.com>
+
+	* interp.cxx (locate_files): Ignore file names with a leading period
+	(such as ".cvsignore").
+
+2005-11-11  John Dallaway  <jld@ecoscentric.com>
+
+	* interp.cxx (locate_subdirs): Ignore directory names with a leading
+	period (such as ".svn").
+
 2004-06-23  John Dallaway  <jld@ecoscentric.com>
 
 	* interp.cxx (locate_subdirs): Avoid use of a trailing period in
--- 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\
 ";