Commit daaba514 authored by ioedeveloper's avatar ioedeveloper

Fixed remixd for windows

parent 021e7e2c
{ {
"name": "@remix-project/remixd", "name": "@remix-project/remixd",
"version": "0.3.0", "version": "0.3.1",
"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 @@ ...@@ -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": "^2.1.8", "chokidar": "^3.5.1",
"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",
......
...@@ -42,8 +42,15 @@ function walkSync (dir: string, filelist: Filelist, sharedFolder: string): Filel ...@@ -42,8 +42,15 @@ function walkSync (dir: string, filelist: Filelist, sharedFolder: string): Filel
filelist = filelist || {} filelist = filelist || {}
files.forEach(function (file) { files.forEach(function (file) {
const subElement = pathModule.join(dir, file) const subElement = pathModule.join(dir, file)
let isSymbolicLink
if (!fs.lstatSync(subElement).isSymbolicLink()) { try {
isSymbolicLink = !fs.lstatSync(subElement).isSymbolicLink()
} catch (error) {
isSymbolicLink = false
}
if (isSymbolicLink) {
if (fs.statSync(subElement).isDirectory()) { if (fs.statSync(subElement).isDirectory()) {
filelist = walkSync(subElement, filelist, sharedFolder) filelist = walkSync(subElement, filelist, sharedFolder)
} else { } else {
...@@ -62,8 +69,14 @@ function resolveDirectory (dir: string, sharedFolder: string): ResolveDirectory ...@@ -62,8 +69,14 @@ function resolveDirectory (dir: string, sharedFolder: string): ResolveDirectory
files.forEach(function (file) { files.forEach(function (file) {
const subElement = pathModule.join(dir, file) const subElement = pathModule.join(dir, file)
let isSymbolicLink
if (!fs.lstatSync(subElement).isSymbolicLink()) { try {
isSymbolicLink = !fs.lstatSync(subElement).isSymbolicLink()
} catch (error) {
isSymbolicLink = false
}
if (isSymbolicLink) {
const relative: string = relativePath(subElement, sharedFolder) const relative: string = relativePath(subElement, sharedFolder)
ret[relative] = { isDirectory: fs.statSync(subElement).isDirectory() } ret[relative] = { isDirectory: fs.statSync(subElement).isDirectory() }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment