Index: openacs-4/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl,v diff -u -N -r1.9.4.1 -r1.9.4.2 --- openacs-4/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl 10 Sep 2015 08:21:16 -0000 1.9.4.1 +++ openacs-4/packages/acs-bootstrap-installer/tcl/10-utilities-procs.tcl 24 Jul 2017 11:09:53 -0000 1.9.4.2 @@ -9,15 +9,21 @@ ad_proc -public ad_find_all_files { {-include_dirs 0} + {-include_bak_dirs 0} {-max_depth 10} {-check_file_func ""} path } { - Returns a list of full paths to all files under $path in the directory tree - (descending the tree to a depth of up to $max_depth). Clients should not - depend on the order of files returned. + Returns a list of full paths to all files under $path in the + directory tree (descending the tree to a depth of up to + $max_depth). Clients should not depend on the order of files + returned. + Per default, the contents of .bak directories (as produced + e.g. via "install from repository" are not included. To include + these, add the flag "-include_bak_dirs 1" to the invocation. + } { # Use the examined_files array to track files that we've examined. array set examined_files [list] @@ -50,9 +56,12 @@ if { [file isfile $file] } { lappend files $file } elseif { [file isdirectory $file] } { - if { $include_dirs == 1 } { - lappend files $file - } + if { $include_bak_dirs && [string match "*.bak" $file] } { + continue + } + if { $include_dirs == 1 } { + lappend files $file + } lappend new_files_to_examine {*}[glob -nocomplain "$file/*"] } }