Index: runtime/bin/file_system_watcher_win.cc |
diff --git a/runtime/bin/file_system_watcher_win.cc b/runtime/bin/file_system_watcher_win.cc |
index 698b04950390168d11dfbb893220ec5274ac543c..ced2cefbb08359f949e5e339528a565aefdd5246 100644 |
--- a/runtime/bin/file_system_watcher_win.cc |
+++ b/runtime/bin/file_system_watcher_win.cc |
@@ -40,8 +40,8 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id, |
int events, |
bool recursive) { |
USE(id); |
- const wchar_t* name = StringUtilsWin::Utf8ToWide(path); |
- HANDLE dir = CreateFileW(name, |
+ Utf8ToWideScope name(path); |
+ HANDLE dir = CreateFileW(name.wide(), |
FILE_LIST_DIRECTORY, |
FILE_SHARE_READ | |
FILE_SHARE_WRITE | |