Fixed Issue 224.
This commit is contained in:
+9
-2
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user