From 15f9c41d4452419279b7a92e49984744481928b3 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sat, 27 Jan 2018 15:18:59 +0100 Subject: [PATCH] Eina: ignore EINA_FILE_LNK on Windows --- src/lib/eina/eina_file.h | 2 +- src/lib/eina/eina_file_win32.c | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/lib/eina/eina_file.h b/src/lib/eina/eina_file.h index 6d2ce17..d8135dd 100644 --- a/src/lib/eina/eina_file.h +++ b/src/lib/eina/eina_file.h @@ -123,7 +123,7 @@ typedef enum { EINA_FILE_DIR, /**< Directory type */ EINA_FILE_BLK, /**< Block device type (unused on Windows) */ EINA_FILE_REG, /**< Regular file type */ - EINA_FILE_LNK, /**< Symbolic link type */ + EINA_FILE_LNK, /**< Symbolic link type (unused on Windows) */ EINA_FILE_SOCK, /**< UNIX domain socket type (unused on Windows) */ EINA_FILE_WHT /**< Whiteout file type (unused on Windows) */ } Eina_File_Type; diff --git a/src/lib/eina/eina_file_win32.c b/src/lib/eina/eina_file_win32.c index 4cb0a22..537723e 100644 --- a/src/lib/eina/eina_file_win32.c +++ b/src/lib/eina/eina_file_win32.c @@ -330,14 +330,13 @@ _eina_file_win32_direct_ls_iterator_next(Eina_File_Direct_Iterator *it, void **d if (attr & FILE_ATTRIBUTE_DIRECTORY) it->info.type = EINA_FILE_DIR; - else if (attr & FILE_ATTRIBUTE_REPARSE_POINT) - it->info.type = EINA_FILE_LNK; else if (attr & (FILE_ATTRIBUTE_ARCHIVE | FILE_ATTRIBUTE_COMPRESSED | FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_NORMAL | FILE_ATTRIBUTE_SPARSE_FILE | - FILE_ATTRIBUTE_TEMPORARY)) + FILE_ATTRIBUTE_TEMPORARY | + FILE_ATTRIBUTE_REPARSE_POINT)) it->info.type = EINA_FILE_REG; else it->info.type = EINA_FILE_UNKNOWN; @@ -1061,8 +1060,7 @@ eina_file_statat(void *container EINA_UNUSED, Eina_File_Direct_Info *info, Eina_ if (stat64(info->path, &buf)) { - if (info->type != EINA_FILE_LNK) - info->type = EINA_FILE_UNKNOWN; + info->type = EINA_FILE_UNKNOWN; return -1; } -- 2.7.4