I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 1ed8a1b6 authored by zzz's avatar zzz
Browse files

i2psnark: Close RAF on error

parent c4ed7719
No related branches found
No related tags found
No related merge requests found
......@@ -1388,6 +1388,7 @@ public class Storage implements Closeable
//rafs[i].write(bs, off + written, len);
pp.write(raf, written, len);
} catch (IOException ioe) {
try { tf.closeRAF(); } catch (IOException ioe2) {}
// get the file name in the logs
IOException ioe2 = new IOException("Error writing " + tf.RAFfile.getAbsolutePath());
ioe2.initCause(ioe);
......@@ -1494,6 +1495,7 @@ public class Storage implements Closeable
raf.seek(start);
raf.readFully(bs, read, len);
} catch (IOException ioe) {
try { tf.closeRAF(); } catch (IOException ioe2) {}
// get the file name in the logs
IOException ioe2 = new IOException("Error reading " + tf.RAFfile.getAbsolutePath());
ioe2.initCause(ioe);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment