[Mono-bugs] [Bug 53289][Min] New - FileStream with FileMode.CreateNew does not object if the file already exists

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 24 Jan 2004 04:11:34 -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 dave-mono@earth.li.

http://bugzilla.ximian.com/show_bug.cgi?id=53289

--- shadow/53289	2004-01-24 04:11:34.000000000 -0500
+++ shadow/53289.tmp.5332	2004-01-24 04:11:34.000000000 -0500
@@ -0,0 +1,39 @@
+Bug#: 53289
+Product: Mono/Class Libraries
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: dave-mono@earth.li               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: FileStream with FileMode.CreateNew does not object if the file already exists
+
+Description of Problem:
+
+FileStream with FileMode.CreateNew does not object if the file already exists
+It should throw an IOException telling you that the file already exists.
+
+
+Steps to reproduce the problem:
+1. Call new FileStream(path, FileMode.CreateNew), where path is a file that
+already exists.
+
+Actual Results:
+It suceeds.
+
+Expected results:
+
+It should throw an IOException
+
+The msdn docs give this as a specific example:
+
+      IOException 	An I/O error occurs, such as specifying
+FileMode.CreateNew and the file specified by path already exists.