diff options
author | B Stack <bgstack15@gmail.com> | 2020-04-18 17:00:42 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2020-04-18 17:00:42 +0000 |
commit | b4ecf755bad016b0d7fbb277106887f405f6b600 (patch) | |
tree | 8cfcea5441be72ad92095a3887ded84d38f9ba11 /zen/file_traverser.cpp | |
parent | Merge branch '10.22' into 'master' (diff) | |
parent | add upstream 10.23 (diff) | |
download | FreeFileSync-b4ecf755bad016b0d7fbb277106887f405f6b600.tar.gz FreeFileSync-b4ecf755bad016b0d7fbb277106887f405f6b600.tar.bz2 FreeFileSync-b4ecf755bad016b0d7fbb277106887f405f6b600.zip |
Merge branch '10.23' into 'master'10.23
add upstream 10.23
See merge request opensource-tracking/FreeFileSync!20
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 2d2a0cce..48185516 100644 --- a/zen/file_traverser.cpp +++ b/zen/file_traverser.cpp @@ -26,7 +26,7 @@ void zen::traverseFolder(const Zstring& dirPath, { DIR* folder = ::opendir(dirPath.c_str()); //directory must NOT end with path separator, except "/" if (!folder) - THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot open directory %x."), L"%x", fmtPath(dirPath)), L"opendir"); + THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot open directory %x."), L"%x", fmtPath(dirPath)), "opendir"); ZEN_ON_SCOPE_EXIT(::closedir(folder)); //never close nullptr handles! -> crash for (;;) @@ -38,7 +38,7 @@ void zen::traverseFolder(const Zstring& dirPath, if (errno == 0) //errno left unchanged => no more items return; - THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot read directory %x."), L"%x", fmtPath(dirPath)), L"readdir"); + THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot read directory %x."), L"%x", fmtPath(dirPath)), "readdir"); //don't retry but restart dir traversal on error! https://devblogs.microsoft.com/oldnewthing/20140612-00/?p=753/ } @@ -51,7 +51,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)), L"readdir: Data corruption; item with empty name."); + throw FileError(replaceCpy(_("Cannot read directory %x."), L"%x", fmtPath(dirPath)), formatSystemError("readdir", L"", L"Data corruption; item with empty name.")); const Zstring& itemPath = appendSeparator(dirPath) + itemName; @@ -59,7 +59,7 @@ void zen::traverseFolder(const Zstring& dirPath, try { if (::lstat(itemPath.c_str(), &statData) != 0) //lstat() does not resolve symlinks - THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot read file attributes of %x."), L"%x", fmtPath(itemPath)), L"lstat"); + THROW_LAST_FILE_ERROR(replaceCpy(_("Cannot read file attributes of %x."), L"%x", fmtPath(itemPath)), "lstat"); } catch (const FileError& e) { |