diff options
author | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:54:58 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2015-10-02 14:54:58 +0200 |
commit | bb807ea0fd605c486bb7ec928ad8edc819ec9c2b (patch) | |
tree | 16fdbd4d91a290d43444dd812720c42948b27754 /zen/file_traverser.cpp | |
parent | 6.14 (diff) | |
download | FreeFileSync-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.cpp | 4 |
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; |