summaryrefslogtreecommitdiff
path: root/zen/file_traverser.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2015-10-02 14:54:58 +0200
committerDaniel Wilhelm <daniel@wili.li>2015-10-02 14:54:58 +0200
commitbb807ea0fd605c486bb7ec928ad8edc819ec9c2b (patch)
tree16fdbd4d91a290d43444dd812720c42948b27754 /zen/file_traverser.cpp
parent6.14 (diff)
downloadFreeFileSync-bb807ea0fd605c486bb7ec928ad8edc819ec9c2b.tar.gz
FreeFileSync-bb807ea0fd605c486bb7ec928ad8edc819ec9c2b.tar.bz2
FreeFileSync-bb807ea0fd605c486bb7ec928ad8edc819ec9c2b.zip
6.15
Diffstat (limited to 'zen/file_traverser.cpp')
-rw-r--r--zen/file_traverser.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/zen/file_traverser.cpp b/zen/file_traverser.cpp
index 2d652d2b..baf40e9e 100644
--- a/zen/file_traverser.cpp
+++ b/zen/file_traverser.cpp
@@ -68,6 +68,8 @@ void zen::traverseFolder(const Zstring& dirPath,
//skip "." and ".."
const Zchar* const shortName = findData.cFileName;
+
+ if (shortName[0] == 0) throw FileError(replaceCpy(_("Cannot enumerate directory %x."), L"%x", fmtFileName(dirPath)), L"Data corruption: Found item without name.");
if (shortName[0] == L'.' &&
(shortName[1] == 0 || (shortName[1] == L'.' && shortName[2] == 0)))
continue;
@@ -125,6 +127,8 @@ void zen::traverseFolder(const Zstring& dirPath,
//don't return "." and ".."
const char* shortName = dirEntry->d_name;
+
+ if (shortName[0] == 0) throw FileError(replaceCpy(_("Cannot enumerate directory %x."), L"%x", fmtFileName(dirPath)), L"Data corruption: Found item without name.");
if (shortName[0] == '.' &&
(shortName[1] == 0 || (shortName[1] == '.' && shortName[2] == 0)))
continue;
bgstack15