https://bugzilla.novell.com/show_bug.cgi?id=378229
Summary: File.Delete on read-only file should throw
System.UnauthorizedAccessException
Product: Mono: Class Libraries
Version: SVN
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: P5 - None
Component: CORLIB
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
[TestFixture]
public class FileDelete
{
string file;
[SetUp]
public void Setup()
{
file = Path.GetTempFileName();
}
[TearDown]
public void TearDown()
{
if (File.Exists(file))
{
File.SetAttributes(file, FileAttributes.Normal);
File.Delete(file);
}
}
[Test]
[ExpectedException(typeof(UnauthorizedAccessException))]
public void FileDelete_FileIsReadOnly_Throws()
{
File.SetAttributes(file, FileAttributes.ReadOnly);
File.Delete(file);
}
}
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs