summaryrefslogtreecommitdiff
path: root/drivers/unix/file_access_unix.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-08-24 08:47:34 +0200
committerRémi Verschelde <rverschelde@gmail.com>2018-08-24 09:23:20 +0200
commitde59fe04e73250229e6ac11f9314e1b75dbdef1a (patch)
treefa99f0927da10719fb7a7e1e8fcce3a97d5fe08c /drivers/unix/file_access_unix.cpp
parent34e58fd831172bad1eebb748c97238c28864423a (diff)
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);
Diffstat (limited to 'drivers/unix/file_access_unix.cpp')
-rw-r--r--drivers/unix/file_access_unix.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/unix/file_access_unix.cpp b/drivers/unix/file_access_unix.cpp
index c25d34125d..ca16c6fcae 100644
--- a/drivers/unix/file_access_unix.cpp
+++ b/drivers/unix/file_access_unix.cpp
@@ -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);
};
}