#BUGFIX by cg expecco_19_1_0 expecco_19_1_0_final1
authorClaus Gittinger <cg@exept.de>
Wed, 05 Jun 2019 14:16:59 +0200
changeset 18805 f6df57c6dbfb
parent 18804 5e06abe51151
child 18806 e4993db9f737
#BUGFIX by cg class: AbstractFileBrowser changed: #currentFileNameHolder endless loop if file not present.
AbstractFileBrowser.st
--- a/AbstractFileBrowser.st	Wed Jun 05 14:16:23 2019 +0200
+++ b/AbstractFileBrowser.st	Wed Jun 05 14:16:59 2019 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2002 by eXept Software AG
               All Rights Reserved
@@ -3036,7 +3034,7 @@
                                     "/ are perfect here, but usually not available in the font
                                     "/ and we have currently no way of knowing if they are...
                                     "/ (could let the font draw into a bitmap and check if there is something...)
-                                    "/ For now, write a dot.·
+                                    "/ For now, write a dot.·
                                     "/ charPrinted := (Character value:(byte + 16r2400))
                                 ].
                             ].
@@ -3907,11 +3905,13 @@
             filenames := holder value.
             newFilenames := Set new.
             filenames do:[:eachFilename|  
-                |existingFilename|
+                |existingFilename count|
                 existingFilename := eachFilename. 
                 existingFilename notNil ifTrue:[
-                    [existingFilename isRootDirectory or:[existingFilename exists]] whileFalse:[
+                    count := 0.
+                    [existingFilename isRootDirectory or:[existingFilename exists or:[count > 10]]] whileFalse:[
                         existingFilename := existingFilename directory.
+                        count := count + 1.
                     ].
                     existingFilename exists ifTrue:[
                         newFilenames add:existingFilename.
@@ -3922,6 +3922,7 @@
         ]
 
     "Modified: / 27-11-2010 / 15:42:45 / cg"
+    "Modified: / 05-06-2019 / 14:12:48 / Claus Gittinger"
 !
 
 defaultFileEncoding
@@ -8888,7 +8889,7 @@
             ] ifFalse:[sig == HaltInterrupt ifTrue:[ |sender|
                 label := msg := 'Breakpoint/Halt in fileIn'.
                 sender := ex suspendedContext.
-                msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
+                msg := msg , ('\\in %1 » %2' bindWith:(sender receiver class name) with:(sender sender selector))
             ] ifFalse:[
                 label := 'Error in fileIn'.
                 msg := 'error in fileIn: %1'