summaryrefslogtreecommitdiff
path: root/src/inspector_profiler.cc
diff options
context:
space:
mode:
authorbcoe <bencoe@google.com>2020-01-28 23:06:44 -0800
committerBenjamin Coe <bencoe@google.com>2020-01-31 11:57:19 -0800
commit13fe56bbbbc290cbc16804994ce0ec1d25729775 (patch)
tree08d6e7fea79a897d44256b011165c5f7c3c988c0 /src/inspector_profiler.cc
parent43fb6ffef7a14b47d1b0ba8134102795f5017a59 (diff)
downloadnode-new-13fe56bbbbc290cbc16804994ce0ec1d25729775.tar.gz
fs: return first folder made by mkdir recursive
mkdir('/foo/bar', { recursive: true }) and mkdirSync will now return the path of the first folder created. This matches more closely mkdirp's behavior, and is useful for setting folder permissions. PR-URL: https://github.com/nodejs/node/pull/31530 Refs: https://github.com/nodejs/node/issues/31481 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/inspector_profiler.cc')
-rw-r--r--src/inspector_profiler.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/inspector_profiler.cc b/src/inspector_profiler.cc
index f9d3c2b512..cc4c309175 100644
--- a/src/inspector_profiler.cc
+++ b/src/inspector_profiler.cc
@@ -107,9 +107,9 @@ void V8ProfilerConnection::V8ProfilerSessionDelegate::SendMessageToFrontend(
}
static bool EnsureDirectory(const std::string& directory, const char* type) {
- uv_fs_t req;
- int ret = fs::MKDirpSync(nullptr, &req, directory, 0777, nullptr);
- uv_fs_req_cleanup(&req);
+ fs::FSReqWrapSync req_wrap_sync;
+ int ret = fs::MKDirpSync(nullptr, &req_wrap_sync.req, directory, 0777,
+ nullptr);
if (ret < 0 && ret != UV_EEXIST) {
char err_buf[128];
uv_err_name_r(ret, err_buf, sizeof(err_buf));