Commit 7bb667f9 authored by Ivan Dokunov's avatar Ivan Dokunov

Bug fixes in FileIterators

parent 0072ec8f
......@@ -21,7 +21,9 @@ const char *CDirIterator::next()
{
m_handle = hf;
return (m_sPath + "\\" + FindFileData.cFileName).c_str();
m_pathStr = m_sPath + "/" + FindFileData.cFileName;
return m_pathStr.c_str();
}
}
}
......
......@@ -9,6 +9,7 @@ class CDirIterator final : public IFileSystem::IFileIterator
{
private:
String m_sPath;
String m_pathStr;
HANDLE m_handle = nullptr;
......
......@@ -23,8 +23,10 @@ const char *CFileExtIterator::next()
//Сохраняем HANDLE файла, что бы можно было продожлить с того места
m_handle = hf;
m_pathStr = m_sPath + "/" + FindFileData.cFileName;
//Возвращаем полный путь, вместе с именем файла и расширением
return (m_sPath + "\\" + FindFileData.cFileName).c_str();
return m_pathStr.c_str();
}
}
......
......@@ -9,6 +9,8 @@ class CFileExtIterator final : public IFileSystem::IFileIterator
{
private:
String m_sPath;
String m_pathStr;
const char *m_szExt;
HANDLE m_handle = nullptr;
......
......@@ -22,7 +22,9 @@ const char *CFileExtsIterator::next()
{
m_handle = hf;
return (m_sPath + "\\" + FindFileData.cFileName).c_str();
m_pathStr = m_sPath + "/" + FindFileData.cFileName;
return m_pathStr.c_str();
}
++m_currentExt;
}
......
......@@ -9,6 +9,7 @@ class CFileExtsIterator final : public IFileSystem::IFileIterator
{
private:
String m_sPath;
String m_pathStr;
const char **m_szExts;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment