fix remixd absolute path

pull/689/head
yann300 4 years ago
parent 630a5bb589
commit 6e3ce7643b
  1. 3
      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)
}
return path
}
@ -34,6 +32,7 @@ function normalizePath (path: string): string {
if (process.platform === 'win32') {
return path.replace(/\\/g, '/')
}
if (path === '/') path = './'
return path
}

Loading…
Cancel
Save