Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Varga <vargaz@gmail.com>2010-03-11 03:51:41 +0300
committerZoltan Varga <vargaz@gmail.com>2010-03-11 03:51:41 +0300
commit53acd8e07620008e5354170ff2ad479db5d200cb (patch)
tree4a3fae0db2ed244210896bcdb01dea4db515928d
parentabe419844c64f489a775964a3c32419f96ddc85e (diff)
2010-03-11 Zoltan Varga <vargaz@gmail.com>mono-2-6-3
* Path.cs (GetTempFileName): Fix infinite loop if the process doesn't have write access to /tmp. Fixes #585017. svn path=/branches/mono-2-6/mcs/; revision=153434
-rw-r--r--mcs/class/corlib/System.IO/ChangeLog5
-rw-r--r--mcs/class/corlib/System.IO/Path.cs4
2 files changed, 9 insertions, 0 deletions
diff --git a/mcs/class/corlib/System.IO/ChangeLog b/mcs/class/corlib/System.IO/ChangeLog
index 3b96d8a13e3..553571b1e2b 100644
--- a/mcs/class/corlib/System.IO/ChangeLog
+++ b/mcs/class/corlib/System.IO/ChangeLog
@@ -1,3 +1,8 @@
+2010-03-11 Zoltan Varga <vargaz@gmail.com>
+
+ * Path.cs (GetTempFileName): Fix infinite loop if the process doesn't have
+ write access to /tmp. Fixes #585017.
+
2010-02-21 Carlos Alberto Cortez <calberto.cortez@gmail.com>
* MemoryStream.cs: Don't clear the bytes beyond Length when shrinking
diff --git a/mcs/class/corlib/System.IO/Path.cs b/mcs/class/corlib/System.IO/Path.cs
index 2887b80d4bb..f550fd4128a 100644
--- a/mcs/class/corlib/System.IO/Path.cs
+++ b/mcs/class/corlib/System.IO/Path.cs
@@ -450,6 +450,10 @@ namespace System.IO {
// avoid an endless loop
throw;
}
+ catch (UnauthorizedAccessException) {
+ // This can happen if we don't have write permission to /tmp
+ throw;
+ }
catch {
}
} while (f == null);