Permalink
Browse files

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.

svn path=/branches/mono-2-6/mcs/; revision=153434
  • Loading branch information...
1 parent abe4198 commit 53acd8e07620008e5354170ff2ad479db5d200cb @vargaz vargaz committed Mar 11, 2010
Showing with 9 additions and 0 deletions.
  1. +5 −0 mcs/class/corlib/System.IO/ChangeLog
  2. +4 −0 mcs/class/corlib/System.IO/Path.cs
@@ -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
@@ -450,6 +450,10 @@ public static string GetTempFileName ()
// avoid an endless loop
throw;
}
+ catch (UnauthorizedAccessException) {
+ // This can happen if we don't have write permission to /tmp
+ throw;
+ }
catch {
}
} while (f == null);

0 comments on commit 53acd8e

Please sign in to comment.