Skip to content

Commit

Permalink
Merge pull request #59838 from keptsecret/3x_fix_filedialog_user_data…
Browse files Browse the repository at this point in the history
…_access
  • Loading branch information
akien-mga authored Apr 4, 2022
2 parents 5f9ae5e + c69689a commit 20e4fa2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/os/dir_access.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 20e4fa2

Please sign in to comment.