diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:23:19 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:23:19 +0200 |
commit | 0887aee8c54d0ed51bb2031431e2bcdafebb4c6e (patch) | |
tree | 69537ceb9787bb25ac363cc4e6cdaf0804d78363 /zen/file_traverser.cpp | |
parent | 5.12 (diff) | |
download | FreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.tar.gz FreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.tar.bz2 FreeFileSync-0887aee8c54d0ed51bb2031431e2bcdafebb4c6e.zip |
5.13
Diffstat (limited to 'zen/file_traverser.cpp')
-rw-r--r-- | zen/file_traverser.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/zen/file_traverser.cpp b/zen/file_traverser.cpp index 9a02eb1e..b39f8416 100644 --- a/zen/file_traverser.cpp +++ b/zen/file_traverser.cpp @@ -17,7 +17,7 @@ #include "dll.h" #include "FindFilePlus/find_file_plus.h" -#elif defined FFS_LINUX +#elif defined FFS_LINUX || defined FFS_MAC #include <sys/stat.h> #include <dirent.h> #endif @@ -498,8 +498,7 @@ private: const DWORD volumeSerial; //may be 0! }; - -#elif defined FFS_LINUX +#elif defined FFS_LINUX || defined FFS_MAC class DirTraverser { public: @@ -515,7 +514,7 @@ public: the buffer whose address is passed in entry as follows: len = offsetof(struct dirent, d_name) + pathconf(dirpath, _PC_NAME_MAX) + 1 entryp = malloc(len); */ - const long maxPath = std::max<long>(::pathconf(directoryFormatted.c_str(), _PC_NAME_MAX), 10000); //::pathconf may return -1 + const size_t maxPath = std::max<long>(::pathconf(directoryFormatted.c_str(), _PC_NAME_MAX), 10000); //::pathconf may return long(-1) buffer.resize(offsetof(struct ::dirent, d_name) + maxPath + 1); traverse(directoryFormatted, sink, 0); |