Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
aeff2520
Unverified
Commit
aeff2520
authored
Feb 04, 2021
by
David Disu
Committed by
GitHub
Feb 04, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #839 from ethereum/bump-remixd
Fixed remixd for windows
parents
021e7e2c
c7e746ed
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
package.json
libs/remixd/package.json
+1
-1
utils.ts
libs/remixd/src/utils.ts
+16
-3
No files found.
libs/remixd/package.json
View file @
aeff2520
{
{
"name"
:
"@remix-project/remixd"
,
"name"
:
"@remix-project/remixd"
,
"version"
:
"0.3.
0
"
,
"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"
,
...
...
libs/remixd/src/utils.ts
View file @
aeff2520
...
@@ -29,10 +29,10 @@ function relativePath (path: string, sharedFolder: string): string {
...
@@ -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
}
}
...
@@ -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
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment