From 6d71679e0c53abf705ab5e1c55d2fa1b1b3ec351 Mon Sep 17 00:00:00 2001 From: Nikolai Vavilov Date: Fri, 16 Oct 2015 14:19:18 +0200 Subject: [PATCH] fs: decode filenames using UTF-8 in fs.watch Fixes #2088. --- src/fs_event_wrap.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fs_event_wrap.cc b/src/fs_event_wrap.cc index 7768f94459c16a..2effe7dcb92ac3 100644 --- a/src/fs_event_wrap.cc +++ b/src/fs_event_wrap.cc @@ -156,7 +156,7 @@ void FSEventWrap::OnEvent(uv_fs_event_t* handle, const char* filename, }; if (filename != nullptr) { - argv[2] = OneByteString(env->isolate(), filename); + argv[2] = String::NewFromUtf8(env->isolate(), filename); } wrap->MakeCallback(env->onchange_string(), ARRAY_SIZE(argv), argv);