mirror of
https://github.com/godotengine/godot.git
synced 2025-10-20 00:13:30 +00:00
Add print_verbose to print to stdout only in verbose mode
Equivalent of the cumbersome: if (OS::get_singleton()->is_stdout_verbose()) print_line(msg);
This commit is contained in:
parent
34e58fd831
commit
de59fe04e7
22 changed files with 68 additions and 123 deletions
|
@ -106,7 +106,6 @@ Error FileAccessUnix::_open(const String &p_path, int p_mode_flags) {
|
|||
if (is_backup_save_enabled() && (p_mode_flags & WRITE) && !(p_mode_flags & READ)) {
|
||||
save_path = path;
|
||||
path = path + ".tmp";
|
||||
//print_line("saving instead to "+path);
|
||||
}
|
||||
|
||||
f = fopen(path.utf8().get_data(), mode_string);
|
||||
|
@ -134,9 +133,6 @@ void FileAccessUnix::close() {
|
|||
}
|
||||
|
||||
if (save_path != "") {
|
||||
|
||||
//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) {
|
||||
|
@ -291,8 +287,7 @@ uint64_t FileAccessUnix::_get_modified_time(const String &p_file) {
|
|||
if (!err) {
|
||||
return flags.st_mtime;
|
||||
} else {
|
||||
print_line("ERROR IN: " + p_file);
|
||||
|
||||
ERR_EXPLAIN("Failed to get modified time for: " + p_file);
|
||||
ERR_FAIL_V(0);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue