diff options
-rw-r--r-- | mcs/class/corlib/System.IO/ChangeLog | 5 | ||||
-rw-r--r-- | mcs/class/corlib/System.IO/Path.cs | 4 |
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); |