mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-11 16:28:09 +07:00
Fixed 'permission denied' open error on iOS
This commit is contained in:
@ -116,12 +116,12 @@ public class IOSLauncher extends IOSApplication.Delegate {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void openURL(NSURL url){
|
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, () -> {
|
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)){
|
if(SaveIO.isSaveValid(file)){
|
||||||
try{
|
try{
|
||||||
@ -134,7 +134,7 @@ public class IOSLauncher extends IOSApplication.Delegate {
|
|||||||
ui.showError("$text.save.import.invalid");
|
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()){
|
if(!ui.editor.isShown()){
|
||||||
ui.editor.show();
|
ui.editor.show();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user