From bb807ea0fd605c486bb7ec928ad8edc819ec9c2b Mon Sep 17 00:00:00 2001 From: Daniel Wilhelm Date: Fri, 2 Oct 2015 14:54:58 +0200 Subject: 6.15 --- zen/file_traverser.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'zen/file_traverser.cpp') 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; -- cgit