From 40b5f8debc34c53c0d4dbaf223483bb608b30343 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=B6ller?= Date: Sun, 22 May 2011 10:41:35 +0000 Subject: [PATCH] Fixed Issue 224. --- Hardware/Ring0.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Hardware/Ring0.cs b/Hardware/Ring0.cs index 482ca81..7a8663c 100644 --- a/Hardware/Ring0.cs +++ b/Hardware/Ring0.cs @@ -77,8 +77,15 @@ namespace OpenHardwareMonitor.Hardware { // try to get a file in the temporary folder try { return Path.GetTempFileName(); - } catch (IOException) { } - catch (UnauthorizedAccessException) { } + } catch (IOException) { + // some I/O exception + } + catch (UnauthorizedAccessException) { + // we do not have the right to create a file in the temp folder + } + catch (NotSupportedException) { + // invalid path format of the TMP system environment variable + } // if this failed, we try to create one in the application folder string fileName = Path.ChangeExtension(