[Mono-bugs] [Bug 60915][Wis] New - File.Move is inconsistent with the ms.net version

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Wed, 30 Jun 2004 01:54:27 -0400 (EDT)


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 ianm@activestate.com.

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

--- shadow/60915	2004-06-30 01:54:27.000000000 -0400
+++ shadow/60915.tmp.11235	2004-06-30 01:54:27.000000000 -0400
@@ -0,0 +1,51 @@
+Bug#: 60915
+Product: Mono: Class Libraries
+Version: unspecified
+OS: other
+OS Details: fedora core2
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: CORLIB
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: ianm@activestate.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: File.Move is inconsistent with the ms.net version
+
+Description of Problem:
+Using File.Move to overwrite an existing file throws an exception on ms.net
+. However the mono does not.
+
+
+Steps to reproduce the problem:
+1. Run the following code snippet 
+
+public static void testMove() {
+ string tempFileSource = "file1";
+ string tempFileDest = "file2";
+
+ File.Move(tempFileSource, tempFileDest);
+}
+
+Actual Results:
+File overwritten correctly
+
+Expected Results:
+Unhandled Exception: System.IO.IOException: Cannot create a file when that
+file already exists.
+
+   at System.IO.__Error.WinIOError(Int32 errorCode, String str)
+   at System.IO.File.Move(String sourceFileName, String destFileName)
+   at ConsoleApplication9.Class1.testMove() in
+h:\dev\test\csharp\consoleapplication9\class1.cs:line 35
+   at ConsoleApplication9.Class1.Main(String[] args) in
+h:\dev\test\csharp\consoleapplication9\class1.cs:line 49
+
+
+How often does this happen? 
+
+consistently