[vcpkg] Handle non-sorted output from std::filesystem

This commit is contained in:
Robert Schumacher 2018-03-23 09:59:42 -07:00
parent 608456b325
commit 7029daa36d
4 changed files with 7 additions and 3 deletions

View File

@ -70,8 +70,8 @@ namespace vcpkg::Install
}
const std::string filename = file.filename().u8string();
if (fs::is_regular_file(status) && (Strings::case_insensitive_ascii_equals(filename.c_str(), "CONTROL") ||
Strings::case_insensitive_ascii_equals(filename.c_str(), "BUILD_INFO")))
if (fs::is_regular_file(status) && (Strings::case_insensitive_ascii_equals(filename, "CONTROL") ||
Strings::case_insensitive_ascii_equals(filename, "BUILD_INFO")))
{
// Do not copy the control file
continue;

View File

@ -251,7 +251,9 @@ namespace vcpkg::Paragraphs
LoadResults try_load_all_ports(const Files::Filesystem& fs, const fs::path& ports_dir)
{
LoadResults ret;
for (auto&& path : fs.get_files_non_recursive(ports_dir))
auto port_dirs = fs.get_files_non_recursive(ports_dir);
Util::sort(port_dirs);
for (auto&& path : port_dirs)
{
auto maybe_spgh = try_load_port(fs, path);
if (const auto spgh = maybe_spgh.get())

View File

@ -54,6 +54,7 @@ namespace vcpkg
StatusParagraphs current_status_db = load_current_database(fs, status_file, status_file_old);
auto update_files = fs.get_files_non_recursive(updates_dir);
Util::sort(update_files);
if (update_files.empty())
{
// updates directory is empty, control file is up-to-date.

View File

@ -405,6 +405,7 @@ namespace vcpkg
{
output.push_back(path.stem().filename().string());
}
Util::sort(output);
return output;
});