fix unable to change directory in user access mode
This commit is contained in:
parent
a5f9e1ce18
commit
c69689ab5a
|
@ -249,6 +249,12 @@ DirAccess *DirAccess::create(AccessType p_access) {
|
|||
DirAccess *da = create_func[p_access] ? create_func[p_access]() : nullptr;
|
||||
if (da) {
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue