aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/commands_install.cpp
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2017-04-07 17:53:57 -0700
committerAlexander Karatarakis <alkarata@microsoft.com>2017-04-07 17:53:57 -0700
commit12f09d3151b44571ce64217ca4f6c5958d249cd6 (patch)
tree2fedcdabec3e587bcb5dca37a1efaf52df08a598 /toolsrc/src/commands_install.cpp
parent2069028b06181dab3c51b2dceb170594153c1204 (diff)
downloadvcpkg-12f09d3151b44571ce64217ca4f6c5958d249cd6.tar.gz
vcpkg-12f09d3151b44571ce64217ca4f6c5958d249cd6.zip
Use Triplet.canonical_name() or .to_string()
Diffstat (limited to 'toolsrc/src/commands_install.cpp')
-rw-r--r--toolsrc/src/commands_install.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/toolsrc/src/commands_install.cpp b/toolsrc/src/commands_install.cpp
index 38672da3a..3b476add3 100644
--- a/toolsrc/src/commands_install.cpp
+++ b/toolsrc/src/commands_install.cpp
@@ -23,10 +23,11 @@ namespace vcpkg::Commands::Install
const size_t prefix_length = package_prefix_path.native().size();
const Triplet& target_triplet = bpgh.spec.target_triplet();
- const std::string& target_triplet_as_string = target_triplet.canonical_name();
+ const std::string& triplet_subfolder = target_triplet.canonical_name();
+ const fs::path triplet_subfolder_path = paths.installed / triplet_subfolder;
std::error_code ec;
- fs::create_directory(paths.installed / target_triplet_as_string, ec);
- output.push_back(Strings::format(R"(%s/)", target_triplet_as_string));
+ fs::create_directory(triplet_subfolder_path, ec);
+ output.push_back(Strings::format(R"(%s/)", triplet_subfolder));
for (auto it = fs::recursive_directory_iterator(package_prefix_path); it != fs::recursive_directory_iterator(); ++it)
{
@@ -38,7 +39,7 @@ namespace vcpkg::Commands::Install
}
const std::string suffix = it->path().generic_u8string().substr(prefix_length + 1);
- const fs::path target = paths.installed / target_triplet_as_string / suffix;
+ const fs::path target = triplet_subfolder_path / suffix;
auto status = it->status(ec);
if (ec)
@@ -56,7 +57,7 @@ namespace vcpkg::Commands::Install
}
// Trailing backslash for directories
- output.push_back(Strings::format(R"(%s/%s/)", target_triplet_as_string, suffix));
+ output.push_back(Strings::format(R"(%s/%s/)", triplet_subfolder, suffix));
continue;
}
@@ -71,7 +72,7 @@ namespace vcpkg::Commands::Install
{
System::println(System::Color::error, "failed: %s: %s", target.u8string(), ec.message());
}
- output.push_back(Strings::format(R"(%s/%s)", target_triplet_as_string, suffix));
+ output.push_back(Strings::format(R"(%s/%s)", triplet_subfolder, suffix));
continue;
}