diff options
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java index cad4b63314..f137b10aca 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java @@ -86,21 +86,23 @@ class AmazonS3Client extends TextBuiltin { int len = c.getContentLength(); final InputStream in = c.getInputStream(); try { + outw.flush(); final byte[] tmp = new byte[2048]; while (len > 0) { final int n = in.read(tmp); if (n < 0) throw new EOFException(MessageFormat.format(CLIText.get().expectedNumberOfbytes, len)); - System.out.write(tmp, 0, n); + outs.write(tmp, 0, n); len -= n; } + outs.flush(); } finally { in.close(); } } else if ("ls".equals(op) || "list".equals(op)) { for (final String k : s3.list(bucket, key)) - System.out.println(k); + outw.println(k); } else if ("rm".equals(op) || "delete".equals(op)) { s3.delete(bucket, key); |