Skip to content
Permalink
Browse files

Fix JENKINS-23660

  • Loading branch information
slide committed Jul 11, 2014
1 parent ea33390 commit bdece53fad4d1fd5d1c65b74e28e7150a5139b67
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/main/java/hudson/plugins/emailext/AttachmentUtils.java
@@ -84,8 +84,13 @@ public LogFileDataSource(AbstractBuild<?,?> build, boolean compress) {

public InputStream getInputStream() throws IOException {
InputStream res;
long logFileLength = build.getLogText().length();
long pos = 0;
ByteArrayOutputStream bao = new ByteArrayOutputStream();
build.getLogText().writeLogTo(0, bao);

while(pos < logFileLength) {
pos = build.getLogText().writeLogTo(pos, bao);
}

res = new ByteArrayInputStream(bao.toByteArray());
if(compress) {
@@ -189,7 +194,7 @@ public static void attachBuildLog(ExtendedEmailPublisherContext context, Multipa
+ " too large for maximum attachments size");
return;
}

DataSource fileSource;
MimeBodyPart attachment = new MimeBodyPart();
if (compress) {

0 comments on commit bdece53

Please sign in to comment.
You can’t perform that action at this time.