diff options
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; |