diff options
-rw-r--r-- | mcs/class/corlib/System.IO/ChangeLog | 4 | ||||
-rw-r--r-- | mcs/class/corlib/System.IO/Directory.cs | 6 |
2 files changed, 10 insertions, 0 deletions
diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog index c6b2af573c4..92942b7eb62 100644 --- a/mcs/class/corlib/System.IO/ChangeLog +++ b/mcs/class/corlib/System.IO/ChangeLog @@ -1,3 +1,7 @@ +2006-05-18 Miguel de Icaza <miguel@novell.com> + + * Directory.cs (Exists): Ignore INVALID_HANDlE, return false. + 2006-06-03 John Luke <john.luke@gmail.com> * Path.cs: fix typo in [Obsolete] message diff --git a/mcs/class/corlib/System.IO/Directory.cs b/mcs/class/corlib/System.IO/Directory.cs index ed835f0d338..9c9ba5fc09f 100644 --- a/mcs/class/corlib/System.IO/Directory.cs +++ b/mcs/class/corlib/System.IO/Directory.cs @@ -174,7 +174,13 @@ namespace System.IO exists = MonoIO.ExistsDirectory (path, out error); if (error != MonoIOError.ERROR_SUCCESS && error != MonoIOError.ERROR_PATH_NOT_FOUND && + error != MonoIOError.ERROR_INVALID_HANDLE && error != MonoIOError.ERROR_ACCESS_DENIED) { + + // INVALID_HANDLE might happen if the file is moved + // while testing for the existence, a kernel issue + // according to Larry Ewing. + throw MonoIO.GetException (path, error); } |