1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0030071: Tests - locate_data_file does not skip .git folders

Regexp is now applied to subfolder name to filter folders starting with dot.
This commit is contained in:
kgv 2018-08-16 14:42:30 +03:00 committed by bugmaster
parent cdcb6655e7
commit 343f7e4d34

View File

@ -1041,8 +1041,10 @@ proc locate_data_file {filename} {
while {[llength $dir] != 0} {
set name [lindex $dir 0]
set dir [lrange $dir 1 end]
# skip directories starting with dot
if { [regexp {^[.]} $name] } { continue }
set aTail [file tail $name]
if { [regexp {^[.]} $aTail] } { continue }
if { [file exists $name/$filename] } {
return [file normalize $name/$filename]
}