0030071: Tests - locate_data_file does not skip .git folders
authorkgv <kgv@opencascade.com>
Thu, 16 Aug 2018 11:42:30 +0000 (14:42 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 16 Aug 2018 14:33:39 +0000 (17:33 +0300)
Regexp is now applied to subfolder name to filter folders starting with dot.

src/DrawResources/TestCommands.tcl

index cbc7eb9..2c994ba 100644 (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]
                 }