summaryrefslogtreecommitdiff
path: root/zen/file_id.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:19 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:23:19 +0200
commit0887aee8c54d0ed51bb2031431e2bcdafebb4c6e (patch)
tree69537ceb9787bb25ac363cc4e6cdaf0804d78363 /zen/file_id.cpp
parent5.12 (diff)
downloadFreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.tar.gz
FreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.tar.bz2
FreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.zip
5.13
Diffstat (limited to 'zen/file_id.cpp')
-rw-r--r--zen/file_id.cpp6
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
bgstack15