[SusiMail] Exception when opening new messages
When opening a new message with SusiMail I get the following error message:
Part ((text/plain)) not shown, because of java.io.IOException: Stream Closed
This is caused by the PersistentMailCache::write
method consuming all of the FileBuffer._is
without resetting it. The following patch fixes this:
--- a/apps/susimail/src/src/i2p/susi/webmail/PersistentMailCache.java
+++ b/apps/susimail/src/src/i2p/susi/webmail/PersistentMailCache.java
@@ -356,6 +356,7 @@ class PersistentMailCache {
GzipFileBuffer gb = new GzipFileBuffer(f);
out = gb.getOutputStream();
DataHelper.copy(in, out);
+ rb.readComplete(true);
return true;
} catch (IOException ioe) {
_log.error("Error writing: " + f + ": " + ioe);