[Mono-bugs] [Bug 54443][Nor] New - TempFileCollection doesn't delete files
Mon, 16 Feb 2004 19:59:59 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by firstname.lastname@example.org.
--- shadow/54443 2004-02-16 19:59:59.000000000 -0500
+++ shadow/54443.tmp.9198 2004-02-16 19:59:59.000000000 -0500
@@ -0,0 +1,56 @@
+Product: Mono/Class Libraries
+OS: Debian Woody
+Summary: TempFileCollection doesn't delete files
+Please fill in this template when reporting a bug, unless you know what
+you are doing.
+Description of Problem:
+The TempFileCollection doesn't delete files after a "using" block and
+after calling Delete() manually.
+Steps to reproduce the problem:
+1. Execute the following:
+ using (TempFileCollection tempFiles = new TempFileCollection())
+ string name = tempFiles.AddExtension("crawler.conf", false);
+ using (StreamWriter writer = new StreamWriter(name, false))
+ // Uncommenting the following doesn't help.
+ // tempFiles.Delete();
+File is created, but is not deleted (even w/ the Delete() call).
+File is deleted
+How often does this happen?
+Calling AddExtension() doesn't look like it will try to avoid file
+conflicts. It never checks for the existence of a temporary file, so it
+seems possible that it occaisionally ends up getting back the name of an