File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,6 @@ const { copy } = internalBinding('buffer');
5353const { inspect } = require ( 'internal/util/inspect' ) ;
5454const { FastBuffer } = require ( 'internal/buffer' ) ;
5555const { getValidatedPath } = require ( 'internal/fs/utils' ) ;
56- const { toNamespacedPath } = require ( 'path' ) ;
5756const {
5857 createHeapSnapshotStream,
5958 triggerHeapSnapshot,
@@ -78,7 +77,6 @@ const { getOptionValue } = require('internal/options');
7877function writeHeapSnapshot ( filename , options ) {
7978 if ( filename !== undefined ) {
8079 filename = getValidatedPath ( filename ) ;
81- filename = toNamespacedPath ( filename ) ;
8280 }
8381 const optionArray = getHeapSnapshotOptions ( options ) ;
8482 return triggerHeapSnapshot ( filename , optionArray ) ;
Original file line number Diff line number Diff line change 22#include " env-inl.h"
33#include " memory_tracker-inl.h"
44#include " node_external_reference.h"
5+ #include " path.h"
56#include " permission/permission.h"
67#include " stream_base-inl.h"
78#include " util-inl.h"
@@ -468,6 +469,7 @@ void TriggerHeapSnapshot(const FunctionCallbackInfo<Value>& args) {
468469
469470 BufferValue path (isolate, filename_v);
470471 CHECK_NOT_NULL (*path);
472+ ToNamespacedPath (env, &path);
471473 THROW_IF_INSUFFICIENT_PERMISSIONS (
472474 env, permission::PermissionScope::kFileSystemWrite , path.ToStringView ());
473475 if (WriteSnapshot (env, *path, options).IsNothing ()) return ;
You can’t perform that action at this time.
0 commit comments