mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-22 12:38:05 +07:00
Fixed 'permission denied' open error on iOS
This commit is contained in:
parent
433cb99eab
commit
d70dd05221
@ -116,12 +116,12 @@ public class IOSLauncher extends IOSApplication.Delegate {
|
||||
}
|
||||
|
||||
void openURL(NSURL url){
|
||||
String str = url.getPath().toLowerCase();
|
||||
FileHandle file = Gdx.files.absolute(getDocumentsDirectory()).child(url.getLastPathComponent());
|
||||
Gdx.files.absolute(url.getPath()).copyTo(file);
|
||||
|
||||
Timers.runTask(30f, () -> {
|
||||
FileHandle file = Gdx.files.absolute(url.getPath());
|
||||
|
||||
if(str.endsWith("mins")){ //open save
|
||||
if(file.extension().equalsIgnoreCase("mins")){ //open save
|
||||
|
||||
if(SaveIO.isSaveValid(file)){
|
||||
try{
|
||||
@ -134,7 +134,7 @@ public class IOSLauncher extends IOSApplication.Delegate {
|
||||
ui.showError("$text.save.import.invalid");
|
||||
}
|
||||
|
||||
}else if(str.endsWith("png")){ //open map
|
||||
}else if(file.extension().equalsIgnoreCase("png")){ //open map
|
||||
if(!ui.editor.isShown()){
|
||||
ui.editor.show();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user