Fix portable data folder reselection
This commit is contained in:
parent
ea4d38cb49
commit
45c903bd24
3 changed files with 39 additions and 2 deletions
|
|
@ -100,7 +100,11 @@ static func migrate_active_to(
|
|||
) -> Dictionary:
|
||||
var normalized: String = destination.simplify_path().trim_suffix("/")
|
||||
if normalized == data_root.root_path:
|
||||
return {"ok": true, "message": "This data folder is already active."}
|
||||
return {
|
||||
"ok": true,
|
||||
"changed": false,
|
||||
"message": "This data folder is already active.",
|
||||
}
|
||||
if DirAccess.dir_exists_absolute(normalized) and not _directory_empty(normalized):
|
||||
if FileAccess.file_exists(normalized.path_join(PlayerDataRoot.MANIFEST_FILENAME)):
|
||||
return {
|
||||
|
|
@ -163,6 +167,7 @@ static func migrate_active_to(
|
|||
return {"ok": false, "message": "Migration copied data but did not change the pointer."}
|
||||
return {
|
||||
"ok": true,
|
||||
"changed": true,
|
||||
"message": "Data folder changed. Previous data was preserved.",
|
||||
"previous_root": old_root,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue