Skip to content

Commit

Permalink
Merge pull request #482 from dragisak/fix-file-separator
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Dec 9, 2022
2 parents b074c40 + eed07c1 commit 9b59275
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/scala/sbtassembly/AssemblyUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ private[sbtassembly] object AssemblyUtils {
readWithEnqueue(() => source.read(), enqueue)

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

override def close(): Unit = {
is.close()
Expand Down

0 comments on commit 9b59275

Please sign in to comment.