Merge pull request #59838 from keptsecret/3x_fix_filedialog_user_data_access

This commit is contained in:
Rémi Verschelde 2022-04-04 21:48:01 +02:00 committed by GitHub
commit 20e4fa2ccc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;