mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-17 11:15:12 -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
|
||||
// not disable use of the natives.
|
||||
if (file.exists()) {
|
||||
try {
|
||||
val inCurrent = libraryUrl.openStream()
|
||||
val inExisting = new FileInputStream(file)
|
||||
var matching = true
|
||||
@ -120,6 +121,11 @@ object LuaStateFactory {
|
||||
while (inCurrentByte != -1 && inExistingByte != -1)
|
||||
inCurrent.close()
|
||||
inExisting.close()
|
||||
}
|
||||
catch {
|
||||
case _: Throwable =>
|
||||
matching = false
|
||||
}
|
||||
if (!matching) {
|
||||
// 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).
|
||||
|
Loading…
x
Reference in New Issue
Block a user