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
6a104702
Unverified
Commit
6a104702
authored
Jan 09, 2018
by
yann300
Committed by
GitHub
Jan 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #983 from ethereum/fixReadonlyonremixd
Fix readonly file on remixd
parents
419dcc71
8eb9ac20
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
shared-folder.js
src/app/files/shared-folder.js
+3
-2
No files found.
src/app/files/shared-folder.js
View file @
6a104702
...
@@ -12,6 +12,7 @@ function buildList (self, path = '', callback) {
...
@@ -12,6 +12,7 @@ function buildList (self, path = '', callback) {
if
(
!
counter
)
callback
(
null
,
fileTree
)
if
(
!
counter
)
callback
(
null
,
fileTree
)
for
(
var
i
=
0
,
name
,
len
=
counter
;
i
<
len
;
i
++
)
{
for
(
var
i
=
0
,
name
,
len
=
counter
;
i
<
len
;
i
++
)
{
name
=
list
[
i
]
name
=
list
[
i
]
self
.
files
[
path
]
=
path
if
(
filesList
[
name
].
isDirectory
)
{
if
(
filesList
[
name
].
isDirectory
)
{
setFolder
(
self
,
path
,
name
,
fileTree
,
finish
)
setFolder
(
self
,
path
,
name
,
fileTree
,
finish
)
}
else
{
}
else
{
...
@@ -56,6 +57,7 @@ module.exports = class SharedFolder {
...
@@ -56,6 +57,7 @@ module.exports = class SharedFolder {
this
.
error
=
{
'EEXIST'
:
'File already exists'
}
this
.
error
=
{
'EEXIST'
:
'File already exists'
}
this
.
_isReady
=
false
this
.
_isReady
=
false
this
.
filesContent
=
{}
this
.
filesContent
=
{}
this
.
files
=
{}
remixd
.
event
.
register
(
'notified'
,
(
data
)
=>
{
remixd
.
event
.
register
(
'notified'
,
(
data
)
=>
{
if
(
data
.
scope
===
'sharedfolder'
)
{
if
(
data
.
scope
===
'sharedfolder'
)
{
...
@@ -145,8 +147,7 @@ module.exports = class SharedFolder {
...
@@ -145,8 +147,7 @@ module.exports = class SharedFolder {
}
}
isReadOnly
(
path
)
{
isReadOnly
(
path
)
{
if
(
this
.
files
)
return
this
.
files
[
path
]
return
false
// TODO: add a callback here to allow calling remixd
return
true
}
}
remove
(
path
)
{
remove
(
path
)
{
...
...
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