summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-03-06 08:37:29 -0500
committerMike Blumenkrantz <zmike@samsung.com>2019-03-06 08:37:29 -0500
commit598ce966d842ac96f8f44ee1fb6ece9e1276dbe9 (patch)
tree10733d28f52521819217f5f8e8c3df221095b3f8 /src/lib
parent9acd9a16f858cfe4d1aa4e60e9517f0d7200b032 (diff)
eina_file: set errno on open fail for win32 build
Summary: windows does not automatically set errno so we must do it ourselves @fix Depends on D8103 Reviewers: vtorri Reviewed By: vtorri Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8104
Diffstat (limited to 'src/lib')
-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 537723e01b..7ed6d030ef 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;