diff --git a/lib/fs.js b/lib/fs.js index bce9d38026169c..59724e884e6dbe 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -3001,8 +3001,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);