AutoDeletedFilename.st
branchjv
changeset 18120 e3a375d5f6a8
parent 18107 d46c13a0795b
parent 16550 4bda4424570d
child 18640 358b275dced9
--- a/AutoDeletedFilename.st	Tue Feb 04 21:09:59 2014 +0100
+++ b/AutoDeletedFilename.st	Wed Apr 01 10:20:10 2015 +0100
@@ -125,14 +125,21 @@
 finalize
     |linkInfo|
 
-    linkInfo := self linkInfo.
-    linkInfo notNil ifTrue:[
-        linkInfo isDirectory ifTrue:[
-            super recursiveRemove
-        ] ifFalse:[
-            super removeFile.
-        ].
-    ].
+    "/ do this in a forked process to avoid blocking
+    "/ in case of an autodeleted remote file of a broken connection
+    [
+        "/ with timeout to avoid waiting forever
+        [
+            linkInfo := self linkInfo.
+            linkInfo notNil ifTrue:[
+                linkInfo isDirectory ifTrue:[
+                    super recursiveRemove
+                ] ifFalse:[
+                    super removeFile.
+                ].
+            ].
+        ] valueWithTimeout:1 minutes.
+    ] fork.
 ! !
 
 !AutoDeletedFilename methodsFor:'queries'!
@@ -168,6 +175,6 @@
 !AutoDeletedFilename class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/AutoDeletedFilename.st,v 1.11 2013-11-13 10:39:12 stefan Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/AutoDeletedFilename.st,v 1.12 2014-06-07 15:08:38 cg Exp $'
 ! !