mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-22 11:43:18 +00:00
Sort remote file lists alphabetically
This commit is contained in:
parent
db061e81ec
commit
424a52a3d8
3 changed files with 4 additions and 3 deletions
|
@ -6,6 +6,7 @@ namespace inst::util {
|
|||
void deinitApp ();
|
||||
void initInstallServices();
|
||||
void deinitInstallServices();
|
||||
bool ignoreCaseCompare(const std::string &a, const std::string &b);
|
||||
std::vector<std::filesystem::path> getDirectoryFiles(const std::string & dir, const std::vector<std::string> & extensions);
|
||||
std::vector<std::filesystem::path> getDirsAtPath(const std::string & dir);
|
||||
bool removeDirectory(std::string dir);
|
||||
|
|
|
@ -282,6 +282,7 @@ namespace netInstStuff{
|
|||
std::string segment;
|
||||
|
||||
while (std::getline(urlStream, segment, '\n')) urls.push_back(segment);
|
||||
std::sort(urls.begin(), urls.end(), inst::util::ignoreCaseCompare);
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -70,9 +70,8 @@ namespace usbInstStuff {
|
|||
// Split the string up into individual title names
|
||||
std::stringstream titleNamesStream(titleListBuf.get());
|
||||
std::string segment;
|
||||
while (std::getline(titleNamesStream, segment, '\n')) {
|
||||
titleNames.push_back(segment);
|
||||
}
|
||||
while (std::getline(titleNamesStream, segment, '\n')) titleNames.push_back(segment);
|
||||
std::sort(titleNames.begin(), titleNames.end(), inst::util::ignoreCaseCompare);
|
||||
|
||||
return titleNames;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue