[Mono-bugs] [Bug 53290][Min] New - Move does not support directory as target

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 24 Jan 2004 04:47:23 -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=53290

--- shadow/53290	2004-01-24 04:47:23.000000000 -0500
+++ shadow/53290.tmp.5405	2004-01-24 04:47:23.000000000 -0500
@@ -0,0 +1,46 @@
+Bug#: 53290
+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: Move does not support directory as target
+
+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.
+using System;
+using System.IO;
+
+class Test {
+    public static void Main() {
+      File.Move("/etc/hostname", "/tmp");
+    }
+
+}
+
+
+Actual Results:
+Unhandled Exception: System.ArgumentException: /tmp is a directory
+
+
+Expected results:
+Success or UnauthorizedAccessException depending on if you have permission
+to move /etc/hostname
+
+This works on MS.NET (move with destination a directory)