Skip to content
Snippets Groups Projects
Commit 7bb667f9 authored by Ivan Dokunov's avatar Ivan Dokunov
Browse files

Bug fixes in FileIterators

parent 0072ec8f
No related branches found
No related tags found
No related merge requests found
...@@ -21,7 +21,9 @@ const char *CDirIterator::next() ...@@ -21,7 +21,9 @@ const char *CDirIterator::next()
{ {
m_handle = hf; 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 ...@@ -9,6 +9,7 @@ class CDirIterator final : public IFileSystem::IFileIterator
{ {
private: private:
String m_sPath; String m_sPath;
String m_pathStr;
HANDLE m_handle = nullptr; HANDLE m_handle = nullptr;
......
...@@ -23,8 +23,10 @@ const char *CFileExtIterator::next() ...@@ -23,8 +23,10 @@ const char *CFileExtIterator::next()
//Сохраняем HANDLE файла, что бы можно было продожлить с того места //Сохраняем HANDLE файла, что бы можно было продожлить с того места
m_handle = hf; 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 ...@@ -9,6 +9,8 @@ class CFileExtIterator final : public IFileSystem::IFileIterator
{ {
private: private:
String m_sPath; String m_sPath;
String m_pathStr;
const char *m_szExt; const char *m_szExt;
HANDLE m_handle = nullptr; HANDLE m_handle = nullptr;
......
...@@ -22,7 +22,9 @@ const char *CFileExtsIterator::next() ...@@ -22,7 +22,9 @@ const char *CFileExtsIterator::next()
{ {
m_handle = hf; m_handle = hf;
return (m_sPath + "\\" + FindFileData.cFileName).c_str(); m_pathStr = m_sPath + "/" + FindFileData.cFileName;
return m_pathStr.c_str();
} }
++m_currentExt; ++m_currentExt;
} }
......
...@@ -9,6 +9,7 @@ class CFileExtsIterator final : public IFileSystem::IFileIterator ...@@ -9,6 +9,7 @@ class CFileExtsIterator final : public IFileSystem::IFileIterator
{ {
private: private:
String m_sPath; String m_sPath;
String m_pathStr;
const char **m_szExts; const char **m_szExts;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment