summaryrefslogtreecommitdiff
path: root/zen/file_traverser.cpp
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2021-01-04 13:48:35 +0000
committerB Stack <bgstack15@gmail.com>2021-01-04 13:48:35 +0000
commitedb1c4482c0a0d91bddfee6e1f9fce234e59840a (patch)
tree494f9fc32eeee34c6c46611ae0137c25a79517a4 /zen/file_traverser.cpp
parentMerge branch '11.4' into 'master' (diff)
parentadd upstream 11.5 (diff)
downloadFreeFileSync-edb1c4482c0a0d91bddfee6e1f9fce234e59840a.tar.gz
FreeFileSync-edb1c4482c0a0d91bddfee6e1f9fce234e59840a.tar.bz2
FreeFileSync-edb1c4482c0a0d91bddfee6e1f9fce234e59840a.zip
Merge branch '11.5' into 'master'11.5
add upstream 11.5 See merge request opensource-tracking/FreeFileSync!29
Diffstat (limited to 'zen/file_traverser.cpp')
-rw-r--r--zen/file_traverser.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/zen/file_traverser.cpp b/zen/file_traverser.cpp
index 0afc28ee..aa48cb85 100644
--- a/zen/file_traverser.cpp
+++ b/zen/file_traverser.cpp
@@ -8,7 +8,7 @@
#include "file_error.h"
- #include <unistd.h> //::pathconf()
+ //#include <unistd.h> //::pathconf()
#include <sys/stat.h>
#include <dirent.h>
@@ -50,7 +50,7 @@ void zen::traverseFolder(const Zstring& dirPath,
const Zstring& itemName = itemNameRaw;
if (itemName.empty()) //checks result of normalizeUtfForPosix, too!
- throw FileError(replaceCpy(_("Cannot read directory %x."), L"%x", fmtPath(dirPath)), formatSystemError("readdir", L"", L"Folder contains child item without a name."));
+ throw FileError(replaceCpy(_("Cannot read directory %x."), L"%x", fmtPath(dirPath)), formatSystemError("readdir", L"", L"Folder contains an item without name."));
const Zstring& itemPath = appendSeparator(dirPath) + itemName;
@@ -82,13 +82,12 @@ void zen::traverseFolder(const Zstring& dirPath,
if (onFile)
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:
- - RTS setup watch (essentially wants to read directories only)
- - removeDirectory (wants to delete everything; pipes can be deleted just like files via "unlink")
- However an "open" on a pipe will block (https://sourceforge.net/p/freefilesync/bugs/221/), so the copy routines need to be smarter!!
- */
+ /* 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:
+ - RTS setup watch (essentially wants to read directories only)
+ - removeDirectory (wants to delete everything; pipes can be deleted just like files via "unlink")
+
+ However an "open" on a pipe will block (https://sourceforge.net/p/freefilesync/bugs/221/), so the copy routines need to be smarter!! */
}
}
catch (const FileError& e)
bgstack15