This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
interp.cxx - ignore hidden files
- From: John Dallaway <jld at ecoscentric dot com>
- To: ecos-patches at sourceware dot org
- Date: Mon, 10 Nov 2008 12:42:04 +0000
- Subject: interp.cxx - ignore hidden files
This patch forces libcdl to ignore files and directories with a leading
period such as ".cvsignore" and ".svn". Checked in.
John Dallaway
eCosCentric Limited
Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/host/libcdl/ChangeLog,v
retrieving revision 1.35
diff -U5 -r1.35 ChangeLog
--- ChangeLog 18 Sep 2008 10:17:13 -0000 1.35
+++ ChangeLog 10 Nov 2008 12:19:11 -0000
@@ -25,10 +25,20 @@
* wizard.cxx, value.cxx, parse.cxx, package.cxx, option.cxx,
interp.cxx, interface.cxx, dialog.cxx, database.cxx, conflict.cxx,
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
the file path. This causes problems for Cygwin 1.5.10.
[ Bugzilla 1000095 ]
Index: interp.cxx
===================================================================
RCS file: /cvs/ecos/ecos/host/libcdl/interp.cxx,v
retrieving revision 1.9
diff -U5 -r1.9 interp.cxx
--- interp.cxx 14 Aug 2008 21:38:30 -0000 1.9
+++ interp.cxx 10 Nov 2008 12:19:11 -0000
@@ -8,11 +8,11 @@
//
//============================================================================
//####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.
//
// This file is part of the eCos host tools.
//
@@ -1177,11 +1177,12 @@
set pattern [file join \"$::cdl_locate_subdirs_path\" *] \n\
set result {} \n\
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\
} \n\
return $result \n\
@@ -1248,11 +1249,14 @@
set result {} \n\
foreach entry [glob -nocomplain -- $pattern] { \n\
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\
";
std::string tcl_result;