diff options
Diffstat (limited to 'drivers/windows')
-rw-r--r-- | drivers/windows/file_access_windows.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/windows/file_access_windows.cpp b/drivers/windows/file_access_windows.cpp index c13300d09f..646e744248 100644 --- a/drivers/windows/file_access_windows.cpp +++ b/drivers/windows/file_access_windows.cpp @@ -93,7 +93,7 @@ Error FileAccessWindows::_open(const String &p_path, int p_mode_flags) { // a file using the wrong case (which *works* on Windows, but won't on other // platforms). if (p_mode_flags == READ) { - WIN32_FIND_DATAW d = { 0 }; + WIN32_FIND_DATAW d; HANDLE f = FindFirstFileW(path.c_str(), &d); if (f) { String fname = d.cFileName; @@ -302,7 +302,7 @@ void FileAccessWindows::store_buffer(const uint8_t *p_src, int p_length) { } prev_op = WRITE; } - ERR_FAIL_COND(fwrite(p_src, 1, p_length, f) != p_length); + ERR_FAIL_COND(fwrite(p_src, 1, p_length, f) != (size_t)p_length); } bool FileAccessWindows::file_exists(const String &p_name) { @@ -340,13 +340,11 @@ uint64_t FileAccessWindows::_get_modified_time(const String &p_file) { } uint32_t FileAccessWindows::_get_unix_permissions(const String &p_file) { - ERR_PRINT("Windows does not support unix permissions"); return 0; } Error FileAccessWindows::_set_unix_permissions(const String &p_file, uint32_t p_permissions) { - ERR_PRINT("Windows does not support unix permissions"); - return FAILED; + return ERR_UNAVAILABLE; } FileAccessWindows::FileAccessWindows() : |