Skip to content

Commit 9aaf67e

Browse files
KodexKyZeno-
authored andcommittedNov 26, 2014
Fix Android main menu crash, and user data directory check.
Signed-off-by: Craig Robbins <kde.psych@gmail.com>
1 parent 1c9f05d commit 9aaf67e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed
 

‎builtin/mainmenu/init.lua

+3-3
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ local function init_globals()
9797

9898
local found_singleplayerworld = false
9999

100-
for world in pairs(world_list) do
100+
for i,world in pairs(world_list) do
101101
if world.name == "singleplayerworld" then
102102
found_singleplayerworld = true
103103
gamedata.worldindex = i
@@ -110,10 +110,10 @@ local function init_globals()
110110

111111
local world_list = core.get_worlds()
112112

113-
for world in pairs(world_list) do
113+
for i,world in pairs(world_list) do
114114
if world.name == "singleplayerworld" then
115115
gamedata.worldindex = i
116-
return
116+
break
117117
end
118118
end
119119
end

‎src/main.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1071,6 +1071,8 @@ static bool create_userdata_path()
10711071
porting::setExternalStorageDir(porting::jnienv);
10721072
if (!fs::PathExists(porting::path_user)) {
10731073
success = fs::CreateDir(porting::path_user);
1074+
} else {
1075+
success = true;
10741076
}
10751077
porting::copyAssets();
10761078
#else

0 commit comments

Comments
 (0)
Please sign in to comment.