#REFACTORING by stefan
class: FileBrowserV2
changed:
#crPressedInPathField
#processEvent:
better use Filename>>#isRegularFile
--- 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
].
].