You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
-Add visible IO errors when closing a file fails due to it being locked (most likely on windows), closes #4760
This commit is contained in:
@@ -124,6 +124,11 @@ void FileAccessUnix::close() {
|
||||
//unlink(save_path.utf8().get_data());
|
||||
//print_line("renaming..");
|
||||
int rename_error = rename((save_path+".tmp").utf8().get_data(),save_path.utf8().get_data());
|
||||
|
||||
if (rename_error && close_fail_notify) {
|
||||
close_fail_notify(save_path);
|
||||
}
|
||||
|
||||
save_path="";
|
||||
ERR_FAIL_COND( rename_error != 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user