mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-13 12:16:53 +07:00
Export last log with crashes
This commit is contained in:
parent
7e45d9b5b4
commit
c51fcd3839
@ -203,10 +203,17 @@ public class SettingsMenuDialog extends SettingsDialog{
|
||||
ui.showInfo("@crash.none");
|
||||
}else{
|
||||
platform.showFileChooser(false, "txt", file -> {
|
||||
Fi log = settings.getDataDirectory().child("last_log.txt");
|
||||
|
||||
StringBuilder out = new StringBuilder();
|
||||
for(Fi fi : settings.getDataDirectory().child("crashes").list()){
|
||||
out.append(fi.name()).append("\n\n").append(fi.readString()).append("\n");
|
||||
}
|
||||
|
||||
if(log.exists()){
|
||||
out.append("\nlast log:\n").append(log.readString());
|
||||
}
|
||||
|
||||
file.writeString(out.toString());
|
||||
app.post(() -> ui.showInfo("@crash.exported"));
|
||||
});
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=6f78ef4e6e78bf84ad0258101e1c0b1061bf05e6
|
||||
archash=c4f0336b9ce1bdd45fae5e9f8c3ae00afb4ad5cb
|
||||
|
Loading…
Reference in New Issue
Block a user