1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Add FileAccess::set_unix_permissions for Unix platforms

This commit is contained in:
Juan Linietsky
2019-04-07 15:46:52 -03:00
parent 65f3a953de
commit cd4449e7ab
23 changed files with 140 additions and 12 deletions

View File

@@ -330,7 +330,7 @@ Error DirAccess::copy(String p_from, String p_to, int p_chmod_flags) {
if (err == OK && p_chmod_flags != -1) {
fdst->close();
err = fdst->_chmod(p_to, p_chmod_flags);
err = FileAccess::set_unix_permissions(p_to, p_chmod_flags);
// If running on a platform with no chmod support (i.e., Windows), don't fail
if (err == ERR_UNAVAILABLE)
err = OK;