From 89634048cb3fc03b08b1e9b3914e37ed89ef41bf Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 4 Jan 2021 12:35:53 +0100 Subject: [PATCH] fix remixd absolute path --- libs/remixd/src/utils.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libs/remixd/src/utils.ts b/libs/remixd/src/utils.ts index e929215241..cfef199e34 100644 --- a/libs/remixd/src/utils.ts +++ b/libs/remixd/src/utils.ts @@ -11,9 +11,7 @@ import * as pathModule from 'path' */ function absolutePath (path: string, sharedFolder:string): string { path = normalizePath(path) - if (path.indexOf(sharedFolder) !== 0) { - path = pathModule.resolve(sharedFolder, path) - } + path = pathModule.resolve(sharedFolder, path) return path } @@ -34,6 +32,7 @@ function normalizePath (path: string): string { if (process.platform === 'win32') { return path.replace(/\\/g, '/') } + if (path === '/') path = './' return path }