refactor
This commit is contained in:
parent
8360d9e045
commit
57ca2c7c6d
@ -322,10 +322,11 @@ auto sia_provider::get_directory_items(const std::string &api_path,
|
|||||||
return api_error::error;
|
return api_error::error;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(list.begin(), list.end(), [](const auto &a, const auto &b) -> bool {
|
std::sort(list.begin(), list.end(),
|
||||||
return (a.directory && not b.directory) ||
|
[](const auto &item1, const auto &item2) -> bool {
|
||||||
(not(b.directory && not a.directory) &&
|
return (item1.directory && not item2.directory) ||
|
||||||
(a.api_path.compare(b.api_path) < 0));
|
(not(item2.directory && not item1.directory) &&
|
||||||
|
(item1.api_path.compare(item2.api_path) < 0));
|
||||||
});
|
});
|
||||||
|
|
||||||
list.insert(list.begin(), directory_item{
|
list.insert(list.begin(), directory_item{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user