[Mono-bugs] [Bug 71614][Nor] New - No exception thrown when deleting a read only file
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Sat, 22 Jan 2005 16:34:47 -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 will@willwap.co.uk.
http://bugzilla.ximian.com/show_bug.cgi?id=71614
--- shadow/71614 2005-01-22 16:34:47.000000000 -0500
+++ shadow/71614.tmp.20038 2005-01-22 16:34:47.000000000 -0500
@@ -0,0 +1,65 @@
+Bug#: 71614
+Product: Mono: Runtime
+Version: 1.0
+OS:
+OS Details: Debian Sid kern=2.6.8-1-k7
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: io-layer
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: will@willwap.co.uk
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: No exception thrown when deleting a read only file
+
+Description of Problem:
+The mono runtime should throw a exception when trying to delete a
+read-only file under gnu/linux.
+
+Steps to reproduce the problem:
+1. create a read-only file "tmp.tmp"
+2. create a file test.cs containing...
+class fred
+{
+ static void Main(string [] args)
+ {
+ System.IO.File.Delete("tmp.tmp");
+ }
+}
+
+3. compile it
+4. run the executable produced (test.exe) with mono
+5. readonly file is deleted without exception
+6. on a windows machine running the same exe with mono, a exception was
+thrown
+
+Unhandled Exception: System.UnauthorizedAccessException: Access to the
+path "tmp
+.tmp" is denied.
+in <0x001be> System.IO.File:Delete (string)
+in <0x0000c> fred:Main (string[])
+
+
+
+Actual Results:
+read only file is deleted
+no exception
+
+
+Expected Results:
+exception thown, the file still there
+
+How often does this happen?
+every time
+
+Additional Information:
+Compiled with mono & the microsoft sdk both tried.
+It seams that the Windows version of mono throws a exception and the
+gnu/linux
+version doesn't. Also the microsoft .Net framework throws a exception.
+
+running mono version 1.0.4