You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 24, 2026. It is now read-only.
@@ -429,32 +429,32 @@ fun versionsFromGitHub(): List<GameVersion> {
429
429
}
430
430
431
431
fununpackGame(version:GameVersion): Int {
432
-
val unpacked = unpackZip("temp/${version.id}", "temp/${version.id}-extract")
432
+
val unpacked = unpackZip(Paths.get("temp/${version.id}").absolute(), Paths.get("temp/${version.id}-extract").absolute())
433
433
if (unpacked !=0) {
434
434
return1
435
435
}
436
436
437
437
if (version.id in arrayOf("0.0.0-indev", "0.0.1-indev") || version isChannelVersion) {
438
-
if (move(Files.list(Paths.get("temp/${version.id}-extract")).findFirst().orElseThrow().toString(), "versions/${version.id}") !=0) {
438
+
if (move(Files.list(Paths.get("temp/${version.id}-extract").absolute()).findFirst().orElseThrow(), Paths.get("versions/${version.id}").absolute()) !=0) {
439
439
return1
440
440
}
441
441
} else {
442
-
if (move("temp/${version.id}-extract", "versions/${version.id}") !=0) {
442
+
if (move(Paths.get("temp/${version.id}-extract").absolute(), Paths.get("versions/${version.id}").absolute()) !=0) {
443
443
return1
444
444
}
445
445
}
446
446
447
447
return0
448
448
}
449
449
450
-
fununpack(path:String, dest:String): Int {
451
-
if (!Gdx.files.local(path).exists()) {
450
+
fununpack(path:Path, dest:Path): Int {
451
+
if (Files.notExists(path)) {
452
452
println("Failed to find $path")
453
453
return-1
454
454
}
455
455
456
-
if (!Gdx.files.local(dest).exists()) {
457
-
Gdx.files.local(dest).mkdirs()
456
+
if (Files.notExists(dest)) {
457
+
Files.createDirectories(dest)
458
458
println("Created $dest")
459
459
} else {
460
460
println("Found $dest")
@@ -470,19 +470,19 @@ fun unpack(path: String, dest: String): Int {
470
470
}
471
471
}
472
472
473
-
funmove(path:String, dest:String): Int {
474
-
if (!Gdx.files.local(path).exists()) {
473
+
funmove(path:Path, dest:Path): Int {
474
+
if (Files.notExists(path)) {
475
475
println("Failed to find $path")
476
476
return1
477
477
}
478
478
479
-
if (Gdx.files.local(dest).exists()) {
479
+
if (Files.exists(dest)) {
480
480
println("Failed to move $path to $dest, $dest already exists")
481
481
return1
482
482
}
483
483
484
484
try {
485
-
Files.move(Paths.get(path), Paths.get(dest))
485
+
Files.move(path, dest)
486
486
} catch (e:Exception) {
487
487
e.printStackTrace()
488
488
return1
@@ -491,35 +491,22 @@ fun move(path: String, dest: String): Int {
0 commit comments