diff options
author | B Stack <bgstack15@gmail.com> | 2021-03-03 01:18:05 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2021-03-03 01:18:05 +0000 |
commit | 320f1ae680d73da35a0cfe4846eb687d8616bcac (patch) | |
tree | 6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/file_traverser.cpp | |
parent | Merge branch '11.6' into 'master' (diff) | |
parent | add upstream 11.7 (diff) | |
download | FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.gz FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.tar.bz2 FreeFileSync-320f1ae680d73da35a0cfe4846eb687d8616bcac.zip |
Merge branch '11.7' into 'master'11.7
add upstream 11.7
See merge request opensource-tracking/FreeFileSync!31
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: |