mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Fix Windows-to-Linux export error
Now chmod() returns ERR_UNAVAILABLE by default, to signal the caller the problem is lack of support instead of a failed operation.
This commit is contained in:
@@ -333,6 +333,9 @@ Error DirAccess::copy(String p_from, String p_to, int chmod_flags) {
|
||||
if (err == OK && chmod_flags != -1) {
|
||||
fdst->close();
|
||||
err = fdst->_chmod(p_to, chmod_flags);
|
||||
// If running on a platform with no chmod support (i.e., Windows), don't fail
|
||||
if (err == ERR_UNAVAILABLE)
|
||||
err = OK;
|
||||
}
|
||||
|
||||
memdelete(fsrc);
|
||||
|
||||
Reference in New Issue
Block a user