diff options
Diffstat (limited to 'zen/file_id.cpp')
-rw-r--r-- | zen/file_id.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zen/file_id.cpp b/zen/file_id.cpp index 3d04ce34..7e0fa81b 100644 --- a/zen/file_id.cpp +++ b/zen/file_id.cpp @@ -11,7 +11,7 @@ #include "long_path_prefix.h" #include "scope_guard.h" -#elif defined FFS_LINUX +#elif defined FFS_LINUX || defined FFS_MAC #include <sys/stat.h> #endif @@ -40,9 +40,9 @@ zen::FileId zen::getFileID(const Zstring& filename) return extractFileID(fileInfo); } -#elif defined FFS_LINUX +#elif defined FFS_LINUX || defined FFS_MAC struct ::stat fileInfo = {}; - if (::stat(filename.c_str(), &fileInfo) == 0) //stat() follows symlinks + if (::lstat(filename.c_str(), &fileInfo) == 0) return extractFileID(fileInfo); #endif |