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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=82141 --- shadow/82141 2007-07-19 11:35:21.000000000 -0400 +++ shadow/82141.tmp.31541 2007-07-19 11:35:21.000000000 -0400 @@ -0,0 +1,51 @@ +Bug#: 82141 +Product: Mono: Class Libraries +Version: 1.2 +OS: +OS Details: FC6 +Status: NEW +Resolution: +Severity: +Priority: Cosmetic +Component: CORLIB +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: File.Move throws UnauthorizedAccessExc. with empty path + +When trying to move a file using File.Move to or from a directory we don't +have write access to, an UnauthorizedAccessException is thrown (so far so +good), but the exceptions message is always 'Access to the path "" is denied.' + +Test case: +========== + +using System; +using System.IO; + +class Move { + public static void Main(string[] args) { + try { + File.Move(args[0], args[1]); + } catch(Exception e) { + Console.WriteLine(e); + } + } +} + +Results: +======== + [EMAIL PROTECTED] mono]$ mono move.exe /usr/bin/vim /tmp/vim +System.UnauthorizedAccessException: Access to the path "" is denied. + at System.IO.File.Move (System.String src, System.String dest) [0x00000] + at Move.Main (System.String[] args) [0x00000] + + [EMAIL PROTECTED] mono]$ mono move.exe /tmp/test.txt /usr/bin/test.txt +System.UnauthorizedAccessException: Access to the path "" is denied. + at System.IO.File.Move (System.String src, System.String dest) [0x00000] + at Move.Main (System.String[] args) [0x00000] _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
