#REFACTORING by stefan
authorStefan Vogel <sv@exept.de>
Wed, 10 Oct 2018 21:25:28 +0200
changeset 18456 290717c02899
parent 18455 74f2616b1351
child 18457 cd5d311f8b73
#REFACTORING by stefan class: FileBrowserV2 changed: #crPressedInPathField #processEvent: better use Filename>>#isRegularFile
FileBrowserV2.st
--- a/FileBrowserV2.st	Wed Oct 10 21:24:09 2018 +0200
+++ b/FileBrowserV2.st	Wed Oct 10 21:25:28 2018 +0200
@@ -2348,8 +2348,8 @@
 
     path := fileEntryFieldHolder value.
     fn := path asFilename.
-    (fn exists and:[ fn isDirectory not ]) ifTrue:[
-	self openApplForFile:path.
+    fn isRegularFile ifTrue:[
+        self openApplForFile:path.
     ]
 !
 
@@ -2372,7 +2372,7 @@
 
             (key == #Return) ifTrue:[
                 fileName := pathEntryField list first asFilename.
-                (fileName exists and:[fileName isDirectory not]) ifTrue:[
+                fileName isRegularFile ifTrue:[
                     self openApplForFile:fileName
                 ].
             ].