updateList - care for vanishing directory
authorClaus Gittinger <cg@exept.de>
Wed, 11 Feb 2009 17:08:43 +0100
changeset 3824 2e4899919eac
parent 3823 1525064c99d2
child 3825 184c9b081973
updateList - care for vanishing directory
FileSelectionList.st
--- a/FileSelectionList.st	Wed Feb 11 16:15:33 2009 +0100
+++ b/FileSelectionList.st	Wed Feb 11 17:08:43 2009 +0100
@@ -9,7 +9,6 @@
  other person.  No title to or ownership of the software is
  hereby transferred.
 "
-
 "{ Package: 'stx:libwidg' }"
 
 SelectionInListView subclass:#FileSelectionList
@@ -968,7 +967,11 @@
             timeStamp := directory modificationTime.
             directoryId := directory id.
             directoryName := directory pathName.
-            directoryContents := (directory fullDirectoryContents ? #()) sort.
+            [
+                directoryContents := (directory fullDirectoryContents ? #()) sort.
+            ] on:FileStream openErrorSignal do:[:ex|
+                directoryContents := nil
+            ].
         ].
 
         newList := OrderedCollection new.
@@ -1083,5 +1086,5 @@
 !FileSelectionList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/FileSelectionList.st,v 1.55 2006-01-17 12:18:20 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/FileSelectionList.st,v 1.56 2009-02-11 16:08:43 cg Exp $'
 ! !