From d556c8d6fc84abb0b803fee8bdad4d1520bac2b4 Mon Sep 17 00:00:00 2001 From: jfrijters Date: Wed, 24 Nov 2010 06:41:25 +0000 Subject: [PATCH] UnauthorizedAccessException caused by already existing file or directory should cause createFileExclusively() to return false instead of throwing an exception. --- runtime/openjdk.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runtime/openjdk.cs b/runtime/openjdk.cs index 055da2af..0d5650af 100644 --- a/runtime/openjdk.cs +++ b/runtime/openjdk.cs @@ -1367,7 +1367,10 @@ namespace IKVM.NativeCode.java } catch (System.UnauthorizedAccessException x) { - throw new jiIOException(x.Message); + if (!System.IO.File.Exists(path) && !System.IO.Directory.Exists(path)) + { + throw new jiIOException(x.Message); + } } catch (System.NotSupportedException x) {