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
255b25c8
Unverified
Commit
255b25c8
authored
Mar 28, 2018
by
yann300
Committed by
GitHub
Mar 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1204 from ethereum/implementReadOnly
implement isReadOnly in sharedFolder provider
parents
dfa30093
05472c45
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
shared-folder.js
src/app/files/shared-folder.js
+3
-1
No files found.
src/app/files/shared-folder.js
View file @
255b25c8
...
...
@@ -10,6 +10,7 @@ module.exports = class SharedFolder {
this
.
type
=
'localhost'
this
.
error
=
{
'EEXIST'
:
'File already exists'
}
this
.
_isReady
=
false
this
.
_readOnlyFiles
=
{}
this
.
filesContent
=
{}
this
.
files
=
{}
...
...
@@ -77,6 +78,7 @@ module.exports = class SharedFolder {
this
.
_remixd
.
call
(
'sharedfolder'
,
'get'
,
{
path
:
unprefixedpath
},
(
error
,
file
)
=>
{
if
(
!
error
)
{
this
.
filesContent
[
path
]
=
file
.
content
if
(
file
.
readonly
)
{
this
.
_readOnlyFiles
[
path
]
=
1
}
cb
(
error
,
file
.
content
)
}
else
{
// display the last known content.
...
...
@@ -101,7 +103,7 @@ module.exports = class SharedFolder {
}
isReadOnly
(
path
)
{
return
false
// TODO: add a callback here to allow calling remixd
return
this
.
_readOnlyFiles
[
path
]
===
1
}
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