浏览代码

Merge pull request #55532 from Calinou/fileaccess-get-modified-time-silence-error

Rémi Verschelde 3 年之前
父节点
当前提交
ff6789adc4
共有 2 个文件被更改,包括 4 次插入2 次删除
  1. 2 1
      drivers/unix/file_access_unix.cpp
  2. 2 1
      drivers/windows/file_access_windows.cpp

+ 2 - 1
drivers/unix/file_access_unix.cpp

@@ -307,7 +307,8 @@ uint64_t FileAccessUnix::_get_modified_time(const String &p_file) {
 	if (!err) {
 		return flags.st_mtime;
 	} else {
-		ERR_FAIL_V_MSG(0, "Failed to get modified time for: " + p_file + ".");
+		print_verbose("Failed to get modified time for: " + p_file + "");
+		return 0;
 	};
 }
 

+ 2 - 1
drivers/windows/file_access_windows.cpp

@@ -335,7 +335,8 @@ uint64_t FileAccessWindows::_get_modified_time(const String &p_file) {
 	if (rv == 0) {
 		return st.st_mtime;
 	} else {
-		ERR_FAIL_V_MSG(0, "Failed to get modified time for: " + file + ".");
+		print_verbose("Failed to get modified time for: " + p_file + "");
+		return 0;
 	}
 }