summaryrefslogtreecommitdiff
path: root/src/lib/eina/eina_file_win32.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina/eina_file_win32.c')
-rw-r--r--src/lib/eina/eina_file_win32.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c
index 537723e..7ed6d03 100644
--- a/src/lib/eina/eina_file_win32.c
+++ b/src/lib/eina/eina_file_win32.c
@@ -736,13 +736,17 @@ eina_file_open(const char *path, Eina_Bool shared)
736 736
737 if (handle == INVALID_HANDLE_VALUE) 737 if (handle == INVALID_HANDLE_VALUE)
738 { 738 {
739 errno = GetLastError();
739 WRN("eina_file_open() failed with file %s: %s", 740 WRN("eina_file_open() failed with file %s: %s",
740 filename, evil_last_error_get()); 741 filename, evil_format_message(errno));
741 goto free_file; 742 goto free_file;
742 } 743 }
743 744
744 if (!GetFileAttributesEx(filename, GetFileExInfoStandard, &fad)) 745 if (!GetFileAttributesEx(filename, GetFileExInfoStandard, &fad))
745 goto close_handle; 746 {
747 errno = GetLastError();
748 goto close_handle;
749 }
746 750
747 length.u.LowPart = fad.nFileSizeLow; 751 length.u.LowPart = fad.nFileSizeLow;
748 length.u.HighPart = fad.nFileSizeHigh; 752 length.u.HighPart = fad.nFileSizeHigh;