Skip to content

Commit

Permalink
Merge pull request #80 from OutpostUniverse/updateGetFileList
Browse files Browse the repository at this point in the history
Update NAS2D for `Filesystem` update to use `std::filesystem::path`
  • Loading branch information
DanRStevens authored Oct 5, 2022
2 parents a06d001 + cbad297 commit cf3d917
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions OP2-Landlord/StartState.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,16 +273,17 @@ void StartState::fillMapMenu()
*/
StringList StartState::getFileList(const std::string& directory)
{
StringList fileList = Utility<Filesystem>::get().directoryList(directory);
auto fileList = Utility<Filesystem>::get().directoryList(directory);
StringList returnList;

Filesystem& f = Utility<Filesystem>::get();

for (size_t i = 0; i < fileList.size(); i++)
for (const auto& file : fileList)
{
if (!f.isDirectory(directory + fileList[i]))
const auto fileString = file.string();
if (!f.isDirectory(directory + fileString))
{
returnList.push_back(fileList[i]);
returnList.push_back(fileString);
}
}

Expand Down

0 comments on commit cf3d917

Please sign in to comment.