Author: gonzalo
Date: 2006-08-03 10:43:52 -0400 (Thu, 03 Aug 2006)
New Revision: 63296

Modified:
   trunk/mcs/class/corlib/System.IO/ChangeLog
   trunk/mcs/class/corlib/System.IO/File.cs
Log:
2006-08-03 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>

        * File.cs: (Delete) avoid creating the exception object for the 'file
        not found' case.



Modified: trunk/mcs/class/corlib/System.IO/ChangeLog
===================================================================
--- trunk/mcs/class/corlib/System.IO/ChangeLog  2006-08-03 14:28:56 UTC (rev 
63295)
+++ trunk/mcs/class/corlib/System.IO/ChangeLog  2006-08-03 14:43:52 UTC (rev 
63296)
@@ -1,3 +1,8 @@
+2006-08-03 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * File.cs: (Delete) avoid creating the exception object for the 'file
+       not found' case.
+
 2006-07-24  Miguel de Icaza  <[EMAIL PROTECTED]>
 
        * FileShare.cs: Add Delete in 2.0

Modified: trunk/mcs/class/corlib/System.IO/File.cs
===================================================================
--- trunk/mcs/class/corlib/System.IO/File.cs    2006-08-03 14:28:56 UTC (rev 
63295)
+++ trunk/mcs/class/corlib/System.IO/File.cs    2006-08-03 14:43:52 UTC (rev 
63296)
@@ -173,9 +173,8 @@
                        MonoIOError error;
                        
                        if (!MonoIO.DeleteFile (path, out error)){
-                               Exception e = MonoIO.GetException (path, error);
-                               if (! (e is FileNotFoundException))
-                                       throw e;
+                               if (error != MonoIOError.ERROR_FILE_NOT_FOUND)
+                                       throw MonoIO.GetException (path, error);
                        }
                }
 

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to