*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Tue, 15 Feb 2005 22:42:02 +0100
changeset 8741 d3f70a668435
parent 8740 bb4a76c88cca
child 8742 579cd65e5290
*** empty log message ***
Filename.st
--- a/Filename.st	Tue Feb 15 20:36:30 2005 +0100
+++ b/Filename.st	Tue Feb 15 22:42:02 2005 +0100
@@ -2714,12 +2714,14 @@
      Raises an exception if not successful.
      Use #recursiveRemove in order to (recursively) remove non empty directories."
 
-    |ok|
-
-    (self linkInfo isDirectory) ifTrue:[
-        ok := OperatingSystem removeDirectory:(self osNameForFile)
+    |linkInfo osName ok|
+
+    osName := self osNameForFile.
+    linkInfo := self linkInfo.
+    (linkInfo notNil and:[linkInfo isDirectory]) ifTrue:[
+        ok := OperatingSystem removeDirectory:osName
     ] ifFalse:[
-        ok := OperatingSystem removeFile:(self osNameForFile)
+        ok := OperatingSystem removeFile:osName
     ].
     ok ifFalse:[
         self exists ifTrue:[
@@ -5041,7 +5043,7 @@
 !Filename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.286 2005-02-09 13:17:10 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Filename.st,v 1.287 2005-02-15 21:42:02 cg Exp $'
 ! !
 
 Filename initialize!