summaryrefslogtreecommitdiff
path: root/zen/file_traverser.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
committerB Stack <bgstack15@gmail.com>2021-03-03 01:18:05 +0000
commit320f1ae680d73da35a0cfe4846eb687d8616bcac (patch)
tree6fb17404841b30822a2d9204e3e0932e55f05ebb /zen/file_traverser.cpp
parentMerge branch '11.6' into 'master' (diff)
parentadd upstream 11.7 (diff)
downloadFreeFileSync-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.cpp8
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:
bgstack15