diff --git a/lib/fs.js b/lib/fs.js index 1c811ad8332009..ce757fc84666a1 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -2981,8 +2981,8 @@ function copyFile(src, dest, mode, callback) { src = getValidatedPath(src, 'src'); dest = getValidatedPath(dest, 'dest'); - src = pathModule._makeLong(src); - dest = pathModule._makeLong(dest); + src = pathModule.toNamespacedPath(src); + dest = pathModule.toNamespacedPath(dest); mode = getValidMode(mode, 'copyFile'); callback = makeCallback(callback);