[Mono-bugs] [Bug 70498][Nor] New - File::Move does not behaves like Msft one.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 12 Dec 2004 19:40:20 -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 mono@evain.net.


--- shadow/70498	2004-12-12 19:40:20.000000000 -0500
+++ shadow/70498.tmp.3688	2004-12-12 19:40:20.000000000 -0500
@@ -0,0 +1,39 @@
+Bug#: 70498
+Product: Mono: Runtime
+Version: 1.0
+OS: All
+OS Details: 
+Status: NEW   
+Priority: Normal
+Component: io-layer
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mono@evain.net               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: File::Move does not behaves like Msft one.
+Description of Problem:
+System.IO.File::Move(string, string) now throws an exception while trying
+to move a file on itself.
+Msft here call the MoveFile from kernel32 that do nothing if source and
+destination are the same file. MoveFile here returns a positive value, as
+it is described in MSDN.
+However, it returns an error if you try to move a file to an existing one.
+This is later wrapped to an IOException (MoveFile returns 0, and you have
+to GetLastError())
+Step to reproduce the problem:
+1. Use File::Move to move a file on itself
+Actual Results:
+Expected Results:
+No exception
+How often does this happen?