add db path candidates
This commit is contained in:
parent
2b349d1287
commit
60351f8199
|
@ -21,7 +21,16 @@ func _ready():
|
||||||
var err = config.load(config_path)
|
var err = config.load(config_path)
|
||||||
if err == OK:
|
if err == OK:
|
||||||
var db_path = config.get_value("general", "db_path")
|
var db_path = config.get_value("general", "db_path")
|
||||||
load_db(db_path)
|
var db_success = load_db(db_path)
|
||||||
|
if not db_success:
|
||||||
|
# HACK: File picker on Android is broken
|
||||||
|
const possible_cfg_paths = ["/foo/bar/logue.cfg"]
|
||||||
|
for possible_path in possible_cfg_paths:
|
||||||
|
if FileAccess.file_exists(possible_path):
|
||||||
|
db_success = load_db(possible_path)
|
||||||
|
if db_success:
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
func switch_state(new: State):
|
func switch_state(new: State):
|
||||||
var old = current_state
|
var old = current_state
|
||||||
|
|
Loading…
Reference in a new issue