-
-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Labels
Description
On Net framework deleting a readonly direcotroy from MockFileSystem dons't thrown any error. Look into the source code here you send only in 3 parameters
But RequestAccess can take up to 7 but the one wonder about is "ignoreMetadataErrors" so default to true meaning this row will never trigger
I quick test on real filsystem shows that this should throw "IOException". Here is the sample
[TestMethod]
public void Test()
{
var fs = new MockFileSystem();
var path = Path.Combine(Directory.GetCurrentDirectory(),"Testad");
var d = fs.Directory.CreateDirectory(path);
// var d = Directory.CreateDirectory(path);
d.Attributes = System.IO.FileAttributes.ReadOnly;
d.Refresh();
d.Delete(true); // This thrown IOException on real filesystem
}