From 1e240d7cc331b19964e39362c00e6ef5c33a26e2 Mon Sep 17 00:00:00 2001 From: Vizor Date: Wed, 30 Mar 2016 15:09:27 +0200 Subject: [PATCH] Removed unnecessary converting to utf8 The boost path used wchar_t on Windows. On Czech Windows there was an error: the resulting utf8 string has odd chars, that was incorrectly converted back to wchar in boost path class. --- include/dir_monitor/windows/basic_dir_monitor_service.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/dir_monitor/windows/basic_dir_monitor_service.hpp b/include/dir_monitor/windows/basic_dir_monitor_service.hpp index 7bc01a0..b49a127 100755 --- a/include/dir_monitor/windows/basic_dir_monitor_service.hpp +++ b/include/dir_monitor/windows/basic_dir_monitor_service.hpp @@ -293,7 +293,7 @@ class basic_dir_monitor_service case FILE_ACTION_RENAMED_OLD_NAME: type = dir_monitor_event::renamed_old_name; break; case FILE_ACTION_RENAMED_NEW_NAME: type = dir_monitor_event::renamed_new_name; break; } - impl->pushback_event(dir_monitor_event(boost::filesystem::path(ck_holder->dirname) / helper::to_utf8(fni->FileName, fni->FileNameLength / sizeof(WCHAR)), type)); + impl->pushback_event(dir_monitor_event(boost::filesystem::path(ck_holder->dirname) / std::wstring(fni->FileName, fni->FileNameLength / sizeof(WCHAR)), type)); offset += fni->NextEntryOffset; } while (fni->NextEntryOffset);