summaryrefslogtreecommitdiff
path: root/drivers/windows
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/windows')
-rw-r--r--drivers/windows/file_access_windows.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp
index ea194e5eae..b4492a2022 100644
--- a/drivers/windows/file_access_windows.cpp
+++ b/drivers/windows/file_access_windows.cpp
@@ -31,11 +31,13 @@
#ifdef WINDOWS_ENABLED
#include "file_access_windows.h"
-#include "os/os.h"
-#include "shlwapi.h"
+
+#include "core/os/os.h"
+#include "core/print_string.h"
+
+#include <shlwapi.h>
#include <windows.h>
-#include "print_string.h"
#include <sys/stat.h>
#include <sys/types.h>
#include <tchar.h>
@@ -133,11 +135,6 @@ void FileAccessWindows::close() {
if (save_path != "") {
- //unlink(save_path.utf8().get_data());
- //print_line("renaming...");
- //_wunlink(save_path.c_str()); //unlink if exists
- //int rename_error = _wrename((save_path+".tmp").c_str(),save_path.c_str());
-
bool rename_error = true;
int attempts = 4;
while (rename_error && attempts) {
@@ -305,11 +302,10 @@ uint64_t FileAccessWindows::_get_modified_time(const String &p_file) {
return st.st_mtime;
} else {
- print_line("no access to " + file);
+ ERR_EXPLAIN("Failed to get modified time for: " + file);
+ ERR_FAIL_V(0);
}
-
- ERR_FAIL_V(0);
-};
+}
FileAccessWindows::FileAccessWindows() {