care for non-existing directory - before removing '.' and '..'
authorClaus Gittinger <cg@exept.de>
Mon, 03 Aug 1998 16:48:08 +0200
changeset 3713 881d419652f3
parent 3712 f93cb659b10d
child 3714 62524619bfb7
care for non-existing directory - before removing '.' and '..'
Filename.st
--- a/Filename.st	Mon Aug 03 16:26:12 1998 +0200
+++ b/Filename.st	Mon Aug 03 16:48:08 1998 +0200
@@ -2245,10 +2245,10 @@
 
     |s contents|
     s := DirectoryStream directoryNamed:(self osNameForDirectory).
-    s notNil ifTrue:[
-        contents := s contents.
-        s close.
-    ].
+    s isNil ifTrue:[^nil].
+
+    contents := s contents.
+    s close.
 
     contents remove:'.' ifAbsent:nil.
     contents remove:'..' ifAbsent:nil.
@@ -2260,7 +2260,7 @@
     "
 
     "Modified: / 18.9.1997 / 18:42:23 / stefan"
-    "Modified: / 27.7.1998 / 19:48:37 / cg"
+    "Modified: / 3.8.1998 / 16:47:29 / cg"
 !
 
 fullDirectoryContents
@@ -2935,6 +2935,6 @@
 !Filename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.124 1998-07-27 17:50:29 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.125 1998-08-03 14:48:08 cg Exp $'
 ! !
 Filename initialize!