2010-04-21 Sebastien Pouliot <sebastien@ximian.com>
authorSebastien Pouliot <sebastien@ximian.com>
Wed, 21 Apr 2010 12:40:57 +0000 (12:40 -0000)
committerSebastien Pouliot <sebastien@ximian.com>
Wed, 21 Apr 2010 12:40:57 +0000 (12:40 -0000)
* FileInfo.cs: Ensure elevated trust when calling Delete on
Moonlight.

svn path=/trunk/mcs/; revision=155869

mcs/class/corlib/System.IO/ChangeLog
mcs/class/corlib/System.IO/FileInfo.cs

index 8d627c035d8712de322dbd2ddc29332d869c2b20..ff33e0d8e75e6b438de16919fd75156537194df5 100644 (file)
@@ -1,3 +1,8 @@
+2010-04-21  Sebastien Pouliot  <sebastien@ximian.com>
+
+       * FileInfo.cs: Ensure elevated trust when calling Delete on 
+       Moonlight.
+
 2010-04-16  Sebastien Pouliot  <sebastien@ximian.com> 
 
        * Directory.cs: Ensure elevated trust when calling on 
index f03d473956176215fb25577d4f81f79dda57a819..004b145290683635b5d46cacbfef7dfc7d9dc8f5 100644 (file)
@@ -221,6 +221,8 @@ namespace System.IO {
                {
                        MonoIOError error;
 
+                       SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight
+
                        if (!MonoIO.Exists (FullPath, out error))
                                // a weird MS.NET behaviour
                                return;