Hardware/Ring0.cs
changeset 294 f7f0f3bafbb7
parent 293 9c1b242b1c63
child 344 3145aadca3d2
     1.1 --- a/Hardware/Ring0.cs	Sun May 22 10:41:35 2011 +0000
     1.2 +++ b/Hardware/Ring0.cs	Sun May 22 11:27:57 2011 +0000
     1.3 @@ -121,8 +121,13 @@
     1.4        if (buffer == null)
     1.5          return false;
     1.6  
     1.7 -      using (FileStream target = new FileStream(fileName, FileMode.Create)) {
     1.8 -        target.Write(buffer, 0, buffer.Length);
     1.9 +      try {
    1.10 +        using (FileStream target = new FileStream(fileName, FileMode.Create)) {
    1.11 +          target.Write(buffer, 0, buffer.Length);
    1.12 +        }
    1.13 +      } catch (IOException) { 
    1.14 +        // for example there is not enough space on the disk
    1.15 +        return false; 
    1.16        }
    1.17  
    1.18        return true;