aboutsummaryrefslogtreecommitdiff
path: root/toolsrc/src/metrics.cpp
diff options
context:
space:
mode:
authorRobert Schumacher <roschuma@microsoft.com>2017-04-11 15:16:39 -0700
committerRobert Schumacher <roschuma@microsoft.com>2017-04-11 15:16:39 -0700
commit0bc21296c9ef32412237a8cc0c8141d0226b9070 (patch)
treebe76ea0d3e3b2d8f469f8ff83fe2187d533efabd /toolsrc/src/metrics.cpp
parentb34c40a4e674f5db538e84ca2b9509482ac140e7 (diff)
downloadvcpkg-0bc21296c9ef32412237a8cc0c8141d0226b9070.tar.gz
vcpkg-0bc21296c9ef32412237a8cc0c8141d0226b9070.zip
[vcpkg] Alias out standard filesystem headers to ensure clean separation.
Diffstat (limited to 'toolsrc/src/metrics.cpp')
-rw-r--r--toolsrc/src/metrics.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/toolsrc/src/metrics.cpp b/toolsrc/src/metrics.cpp
index 515d7e574..cfdd418c3 100644
--- a/toolsrc/src/metrics.cpp
+++ b/toolsrc/src/metrics.cpp
@@ -3,6 +3,7 @@
#include "filesystem_fs.h"
#include "vcpkg_Strings.h"
#include "vcpkg_System.h"
+#include "vcpkg_Files.h"
namespace vcpkg::Metrics
{
@@ -385,24 +386,26 @@ true
const fs::path temp_folder_path = temp_folder;
const fs::path temp_folder_path_exe = temp_folder_path / "vcpkgmetricsuploader.exe";
+ auto& fs = Files::get_real_filesystem();
+
if (true)
{
- const fs::path exe_path = []() -> fs::path
+ const fs::path exe_path = [&fs]() -> fs::path
{
auto vcpkgdir = get_bindir().parent_path();
auto path = vcpkgdir / "vcpkgmetricsuploader.exe";
- if (fs::exists(path))
+ if (fs.exists(path))
return path;
path = vcpkgdir / "scripts" / "vcpkgmetricsuploader.exe";
- if (fs::exists(path))
+ if (fs.exists(path))
return path;
return L"";
}();
std::error_code ec;
- fs::copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec);
+ fs.copy_file(exe_path, temp_folder_path_exe, fs::copy_options::skip_existing, ec);
if (ec)
return;
}