Update normalize path for windows check

pull/5370/head
ioedeveloper 4 years ago
parent 6c5fe91437
commit 64bfbea6d8
  1. 4
      libs/remixd/package.json
  2. 2
      libs/remixd/src/utils.ts

@ -1,6 +1,6 @@
{ {
"name": "@remix-project/remixd", "name": "@remix-project/remixd",
"version": "0.3.1", "version": "0.3.2",
"description": "remix server: allow accessing file system from remix.ethereum.org and start a dev environment (see help section)", "description": "remix server: allow accessing file system from remix.ethereum.org and start a dev environment (see help section)",
"main": "index.js", "main": "index.js",
"types": "./index.d.ts", "types": "./index.d.ts",
@ -40,7 +40,7 @@
"@remixproject/plugin-utils": "^0.3.3", "@remixproject/plugin-utils": "^0.3.3",
"@remixproject/plugin-ws": "^0.3.3", "@remixproject/plugin-ws": "^0.3.3",
"axios": "^0.20.0", "axios": "^0.20.0",
"chokidar": "^3.5.1", "chokidar": "^2.1.8",
"commander": "^2.20.3", "commander": "^2.20.3",
"fs-extra": "^3.0.1", "fs-extra": "^3.0.1",
"isbinaryfile": "^3.0.2", "isbinaryfile": "^3.0.2",

@ -29,10 +29,10 @@ function relativePath (path: string, sharedFolder: string): string {
} }
function normalizePath (path: string): string { function normalizePath (path: string): string {
if (path === '/') path = './'
if (process.platform === 'win32') { if (process.platform === 'win32') {
return path.replace(/\\/g, '/') return path.replace(/\\/g, '/')
} }
if (path === '/') path = './'
return path return path
} }

Loading…
Cancel
Save