0023970: Ignore dot-paths when searching for data files
authorabv <abv@opencascade.com>
Fri, 17 May 2013 16:24:26 +0000 (20:24 +0400)
committerabv <abv@opencascade.com>
Fri, 31 May 2013 13:08:23 +0000 (17:08 +0400)
src/DrawResources/TestCommands.tcl

index 325ae5b..29a64e4 100644 (file)
@@ -759,10 +759,12 @@ proc locate_data_file {filename} {
            while {[llength $dir] != 0} { 
                set name [lindex $dir 0]
                set dir [lrange $dir 1 end]
-               eval lappend dir [glob -nocomplain -directory $name -type d *]
+                # skip directories starting with dot
+                if { [regexp {^[.]} $name] } { continue }
                if { [file exists $name/$filename] } {
                    return [file normalize $name/$filename]
                }
+               eval lappend dir [glob -nocomplain -directory $name -type d *]
            }
        }
     }