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(