fix unable to change directory in user access mode
(cherry picked from commit c69689ab5a
)
This commit is contained in:
parent
3680cfde86
commit
b95221fb0a
|
@ -249,6 +249,12 @@ DirAccess *DirAccess::create(AccessType p_access) {
|
||||||
DirAccess *da = create_func[p_access] ? create_func[p_access]() : nullptr;
|
DirAccess *da = create_func[p_access] ? create_func[p_access]() : nullptr;
|
||||||
if (da) {
|
if (da) {
|
||||||
da->_access_type = p_access;
|
da->_access_type = p_access;
|
||||||
|
|
||||||
|
if (p_access == ACCESS_RESOURCES) {
|
||||||
|
da->change_dir("res://");
|
||||||
|
} else if (p_access == ACCESS_USERDATA) {
|
||||||
|
da->change_dir("user://");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return da;
|
return da;
|
||||||
|
|
Loading…
Reference in New Issue