diff options
author | B Stack <bgstack15@gmail.com> | 2021-03-02 17:23:41 -0500 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2021-03-02 17:23:41 -0500 |
commit | 840e906a4ddbbb32b8a5989e8a0ce10c8c374819 (patch) | |
tree | 6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/file_traverser.cpp | |
parent | Merge branch '11.6' into 'master' (diff) | |
download | FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.tar.gz FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.tar.bz2 FreeFileSync-840e906a4ddbbb32b8a5989e8a0ce10c8c374819.zip |
add upstream 11.7
Diffstat (limited to 'zen/file_traverser.cpp')
-rw-r--r-- | zen/file_traverser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/zen/file_traverser.cpp b/zen/file_traverser.cpp index aa48cb85..f1b5519b 100644 --- a/zen/file_traverser.cpp +++ b/zen/file_traverser.cpp @@ -31,7 +31,7 @@ void zen::traverseFolder(const Zstring& dirPath, for (;;) { errno = 0; - const struct ::dirent* dirEntry = ::readdir(folder); //don't use readdir_r(), see comment in native.cpp + const dirent* dirEntry = ::readdir(folder); //don't use readdir_r(), see comment in native.cpp if (!dirEntry) { if (errno == 0) //errno left unchanged => no more items @@ -54,7 +54,7 @@ void zen::traverseFolder(const Zstring& dirPath, const Zstring& itemPath = appendSeparator(dirPath) + itemName; - struct ::stat statData = {}; + struct stat statData = {}; try { if (::lstat(itemPath.c_str(), &statData) != 0) //lstat() does not resolve symlinks @@ -75,12 +75,12 @@ void zen::traverseFolder(const Zstring& dirPath, else if (S_ISDIR(statData.st_mode)) //a directory { if (onFolder) - onFolder({ itemName, itemPath }); + onFolder({itemName, itemPath}); } else //a file or named pipe, etc. { if (onFile) - onFile({ itemName, itemPath, makeUnsigned(statData.st_size), statData.st_mtime }); + onFile({itemName, itemPath, makeUnsigned(statData.st_size), statData.st_mtime}); } /* It may be a good idea to not check "S_ISREG(statData.st_mode)" explicitly and to not issue an error message on other types to support these scenarios: |