Skip to content

Commit 9b59275

Browse files
authored
Merge pull request #482 from dragisak/fix-file-separator
2 parents b074c40 + eed07c1 commit 9b59275

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/main/scala/sbtassembly/AssemblyUtils.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ private[sbtassembly] object AssemblyUtils {
2727
readWithEnqueue(() => source.read(), enqueue)
2828

2929
override def read(b: Array[Byte], off: Int, len: Int): Int =
30-
readWithEnqueue(() => source.read(b, off, len), _ => b.map(_.toInt).foreach(enqueue))
30+
readWithEnqueue(() => source.read(b, off, len), {
31+
case -1 => ()
32+
case bytesRead => (off until off + bytesRead).foreach(i => enqueue(b(i).toInt))
33+
})
3134

3235
override def close(): Unit = {
3336
is.close()

0 commit comments

Comments
 (0)