Fix archive local storage bug

This commit is contained in:
Anuken
2017-12-20 20:56:59 -05:00
parent a8b6ebacca
commit ac7deb77b6
4 changed files with 14 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
package io.anuke.mindustry.ui;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.utils.reflect.ClassReflection;
import io.anuke.mindustry.Vars;
@@ -41,6 +42,10 @@ public class SaveDialog extends LoadDialog{
Timers.runTask(5f, () -> {
hide();
Vars.ui.hideLoading();
if(Gdx.files.getLocalStoragePath().equals("C:\\Windows\\System32")){
Vars.ui.showError("[orange]Invalid local storage directory![]\nAre you running the game from inside a zip file?");
return;
}
try{
SaveIO.saveToSlot(slot);
}catch(Throwable e){