From 72236295e3c0cad4246e016208061677330137ae Mon Sep 17 00:00:00 2001 From: dragonwocky <thedragonring.bod@gmail.com> Date: Tue, 11 Aug 2020 09:43:11 +1000 Subject: [PATCH] patch escape slashes in realpath --- pkg/helpers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/helpers.js b/pkg/helpers.js index c41e4e0..fa5f03e 100644 --- a/pkg/helpers.js +++ b/pkg/helpers.js @@ -45,7 +45,7 @@ const is_wsl = // transform a wsl filepath to its relative windows filepath if necessary. function realpath(hack_path) { - if (!is_wsl) return hack_path; + if (!is_wsl) return hack_path.replace(/\\/g, '/'); hack_path = fs.realpathSync(hack_path); if (hack_path.startsWith('/mnt/')) { hack_path = `${hack_path[5].toUpperCase()}:${hack_path.slice(6)}`;