From 3320b017f865b2a0d27b46c8a202ef41ee400160 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 19 Sep 2020 23:44:10 +0300 Subject: pdb::file: use wide WinAPI --- src/utils/file.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/utils') diff --git a/src/utils/file.cpp b/src/utils/file.cpp index 4d7dd53..8380fe9 100644 --- a/src/utils/file.cpp +++ b/src/utils/file.cpp @@ -6,6 +6,7 @@ #include #include +#include #include @@ -17,7 +18,7 @@ namespace pdb { namespace file { std::size_t get_size(const std::string& path) { - const Handle handle{CreateFileA(path.c_str(), + const Handle handle{CreateFileW(boost::nowide::widen(path).c_str(), FILE_READ_ATTRIBUTES, FILE_SHARE_READ, NULL, @@ -42,7 +43,7 @@ std::size_t get_size(const std::string& path) { } ID query_id(const std::string& path) { - const Handle handle{CreateFileA(path.c_str(), + const Handle handle{CreateFileW(boost::nowide::widen(path).c_str(), FILE_READ_ATTRIBUTES, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, -- cgit v1.2.3