mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-25 21:20: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 deinitApp ();
|
||||||
void initInstallServices();
|
void initInstallServices();
|
||||||
void deinitInstallServices();
|
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> getDirectoryFiles(const std::string & dir, const std::vector<std::string> & extensions);
|
||||||
std::vector<std::filesystem::path> getDirsAtPath(const std::string & dir);
|
std::vector<std::filesystem::path> getDirsAtPath(const std::string & dir);
|
||||||
bool removeDirectory(std::string dir);
|
bool removeDirectory(std::string dir);
|
||||||
|
|
|
@ -282,6 +282,7 @@ namespace netInstStuff{
|
||||||
std::string segment;
|
std::string segment;
|
||||||
|
|
||||||
while (std::getline(urlStream, segment, '\n')) urls.push_back(segment);
|
while (std::getline(urlStream, segment, '\n')) urls.push_back(segment);
|
||||||
|
std::sort(urls.begin(), urls.end(), inst::util::ignoreCaseCompare);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,9 +70,8 @@ namespace usbInstStuff {
|
||||||
// Split the string up into individual title names
|
// Split the string up into individual title names
|
||||||
std::stringstream titleNamesStream(titleListBuf.get());
|
std::stringstream titleNamesStream(titleListBuf.get());
|
||||||
std::string segment;
|
std::string segment;
|
||||||
while (std::getline(titleNamesStream, segment, '\n')) {
|
while (std::getline(titleNamesStream, segment, '\n')) titleNames.push_back(segment);
|
||||||
titleNames.push_back(segment);
|
std::sort(titleNames.begin(), titleNames.end(), inst::util::ignoreCaseCompare);
|
||||||
}
|
|
||||||
|
|
||||||
return titleNames;
|
return titleNames;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue