FSelList.st
changeset 95 7535cfca9509
parent 87 2c6ab478466a
child 131 208fa92f434d
--- a/FSelList.st	Wed Feb 22 04:41:31 1995 +0100
+++ b/FSelList.st	Mon Feb 27 11:41:57 1995 +0100
@@ -25,7 +25,7 @@
 COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libwidg/Attic/FSelList.st,v 1.12 1995-02-16 16:31:39 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/FSelList.st,v 1.13 1995-02-27 10:39:05 claus Exp $
 '!
 
 !FileSelectionList class methodsFor:'documentation'!
@@ -46,7 +46,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libwidg/Attic/FSelList.st,v 1.12 1995-02-16 16:31:39 claus Exp $
+$Header: /cvs/stx/stx/libwidg/Attic/FSelList.st,v 1.13 1995-02-27 10:39:05 claus Exp $
 "
 !
 
@@ -353,7 +353,7 @@
 updateList
     "set the lists contents to the filenames in the directory"
 
-    |oldCursor files newList index|
+    |oldCursor files newList index path|
 
     directory isNil ifTrue:[
 	super list:nil.
@@ -381,36 +381,41 @@
     newList := OrderedCollection new.
     fileTypes := OrderedCollection new.
     index := 1.
-    files do:[:name |
-	|fullName|
 
-	fullName := directory pathName , Filename separator asString , name.
+    path := directory pathName , Filename separator asString.
+    files do:[:name |
+	|type|
 
-	(matchBlock isNil or:[matchBlock value:fullName]) ifTrue:[
-	    (directoryFileTypes at:index) == #directory ifTrue:[
+	(matchBlock isNil or:[matchBlock value:(path , name)]) ifTrue:[
+	    type := directoryFileTypes at:index.
+	    type == #directory ifTrue:[
 		name = '..' ifTrue:[
 		    ignoreParentDirectory ifFalse:[
 			newList add:name.
-			fileTypes add:(directoryFileTypes at:index)
+			fileTypes add:type
 		    ]
 		] ifFalse:[
 		    name = '.' ifTrue:[
 			"ignore"
 		    ] ifFalse:[
 			newList add:(name ", ' ...'").
-			fileTypes add:(directoryFileTypes at:index)
+			fileTypes add:type
 		    ]
 		]
 	    ] ifFalse:[
-		(pattern isNil or:[pattern isEmpty or:[pattern = '*' or:[pattern match:name]]]) ifTrue:[
+		(pattern isNil 
+		or:[pattern isEmpty 
+		or:[pattern = '*' 
+		or:[pattern match:name]]]) ifTrue:[
 		    newList add:name.
-		    fileTypes add:(directoryFileTypes at:index)
+		    fileTypes add:type
 		]
 	    ].
 	].
 	index := index + 1
     ].
     super list:newList.
+
     self cursor:oldCursor.
 !