Fixed Issue 225.

This commit is contained in:
Michael Möller
2011-05-22 11:27:57 +00:00
parent 40b5f8debc
commit f55ace5f49
+7 -2
View File
@@ -121,8 +121,13 @@ namespace OpenHardwareMonitor.Hardware {
if (buffer == null)
return false;
using (FileStream target = new FileStream(fileName, FileMode.Create)) {
target.Write(buffer, 0, buffer.Length);
try {
using (FileStream target = new FileStream(fileName, FileMode.Create)) {
target.Write(buffer, 0, buffer.Length);
}
} catch (IOException) {
// for example there is not enough space on the disk
return false;
}
return true;