Explorar o código

Don't use (broken) home-grown test for file existence


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@31319 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements %!s(int64=17) %!d(string=hai) anos
pai
achega
ecb8fdd231
Modificáronse 1 ficheiros con 5 adicións e 7 borrados
  1. 5 7
      lib/init/gis_set.tcl

+ 5 - 7
lib/init/gis_set.tcl

@@ -138,13 +138,11 @@ proc CheckLocation {} {
     } else {
         cdir $dir
         .frame0.frameNMS.second.entry configure -state disabled
-        foreach filename [lsort [glob -nocomplain *]] {
-            if {[string compare $filename "PERMANENT"] == 0} {
-                # All good locations have valid PERMANENT mapset.
-                if {[file exists "$dir/PERMANENT/DEFAULT_WIND"] != 0} {
-                    set found 1
-                    .frame0.frameNMS.second.entry configure -state normal
-                }
+        if {[file isdirectory "PERMANENT"]} {
+            # All good locations have valid PERMANENT mapset.
+            if {[file exists "$dir/PERMANENT/DEFAULT_WIND"] != 0} {
+                set found 1
+                .frame0.frameNMS.second.entry configure -state normal
             }
         }
     }