mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-18 11:48:02 -04:00
Added another try-catch to the native lib version check in case rights settings get weird (reported on MCF).
This commit is contained in:
parent
da264e3aca
commit
ce4316e91d
@ -103,6 +103,7 @@ object LuaStateFactory {
|
|||||||
// If the file, already exists, make sure it's the same we need, if it's
|
// If the file, already exists, make sure it's the same we need, if it's
|
||||||
// not disable use of the natives.
|
// not disable use of the natives.
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
|
try {
|
||||||
val inCurrent = libraryUrl.openStream()
|
val inCurrent = libraryUrl.openStream()
|
||||||
val inExisting = new FileInputStream(file)
|
val inExisting = new FileInputStream(file)
|
||||||
var matching = true
|
var matching = true
|
||||||
@ -120,6 +121,11 @@ object LuaStateFactory {
|
|||||||
while (inCurrentByte != -1 && inExistingByte != -1)
|
while (inCurrentByte != -1 && inExistingByte != -1)
|
||||||
inCurrent.close()
|
inCurrent.close()
|
||||||
inExisting.close()
|
inExisting.close()
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
case _: Throwable =>
|
||||||
|
matching = false
|
||||||
|
}
|
||||||
if (!matching) {
|
if (!matching) {
|
||||||
// Try to delete an old instance of the library, in case we have an update
|
// Try to delete an old instance of the library, in case we have an update
|
||||||
// and deleteOnExit fails (which it regularly does on Windows it seems).
|
// and deleteOnExit fails (which it regularly does on Windows it seems).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user