mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-13 09:18:05 -04:00
use buffer in LuaStateFactory file comparison (#137)
This commit is contained in:
parent
d19255dda9
commit
82e6cea22b
@ -1,5 +1,6 @@
|
|||||||
package li.cil.oc.server.machine.luac
|
package li.cil.oc.server.machine.luac
|
||||||
|
|
||||||
|
import java.io.BufferedInputStream
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileInputStream
|
import java.io.FileInputStream
|
||||||
import java.io.FileOutputStream
|
import java.io.FileOutputStream
|
||||||
@ -242,8 +243,8 @@ abstract class LuaStateFactory {
|
|||||||
if (tmpLibFile.exists()) {
|
if (tmpLibFile.exists()) {
|
||||||
var matching = true
|
var matching = true
|
||||||
try {
|
try {
|
||||||
val inCurrent = libraryUrl.openStream()
|
val inCurrent = new BufferedInputStream(libraryUrl.openStream())
|
||||||
val inExisting = new FileInputStream(tmpLibFile)
|
val inExisting = new BufferedInputStream(new FileInputStream(tmpLibFile))
|
||||||
var inCurrentByte = 0
|
var inCurrentByte = 0
|
||||||
var inExistingByte = 0
|
var inExistingByte = 0
|
||||||
do {
|
do {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user