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
26d5e1cb
Commit
26d5e1cb
authored
Feb 13, 2018
by
yann300
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add private _exist function to browser-files.js
parent
ccdc138b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
browser-files.js
src/app/files/browser-files.js
+8
-4
No files found.
src/app/files/browser-files.js
View file @
26d5e1cb
...
@@ -9,11 +9,15 @@ function Files (storage) {
...
@@ -9,11 +9,15 @@ function Files (storage) {
this
.
type
=
'browser'
this
.
type
=
'browser'
this
.
exists
=
function
(
path
,
cb
)
{
this
.
exists
=
function
(
path
,
cb
)
{
cb
(
null
,
this
.
_exists
(
path
))
}
this
.
_exists
=
function
(
path
)
{
var
unprefixedpath
=
this
.
removePrefix
(
path
)
var
unprefixedpath
=
this
.
removePrefix
(
path
)
// NOTE: ignore the config file
// NOTE: ignore the config file
if
(
path
===
'.remix.config'
)
return
cb
(
null
,
false
)
if
(
path
===
'.remix.config'
)
return
false
return
cb
(
null
,
this
.
isReadOnly
(
unprefixedpath
)
||
storage
.
exists
(
unprefixedpath
)
)
return
this
.
isReadOnly
(
unprefixedpath
)
||
storage
.
exists
(
unprefixedpath
)
}
}
this
.
init
=
function
(
cb
)
{
this
.
init
=
function
(
cb
)
{
...
@@ -75,7 +79,7 @@ function Files (storage) {
...
@@ -75,7 +79,7 @@ function Files (storage) {
this
.
remove
=
function
(
path
)
{
this
.
remove
=
function
(
path
)
{
var
unprefixedpath
=
this
.
removePrefix
(
path
)
var
unprefixedpath
=
this
.
removePrefix
(
path
)
if
(
!
this
.
exists
(
unprefixedpath
))
{
if
(
!
this
.
_
exists
(
unprefixedpath
))
{
return
false
return
false
}
}
...
@@ -133,7 +137,7 @@ function Files (storage) {
...
@@ -133,7 +137,7 @@ function Files (storage) {
}
}
// rename .browser-solidity.json to .remix.config
// rename .browser-solidity.json to .remix.config
if
(
this
.
exists
(
'.browser-solidity.json'
))
{
if
(
this
.
_
exists
(
'.browser-solidity.json'
))
{
this
.
rename
(
'.browser-solidity.json'
,
'.remix.config'
)
this
.
rename
(
'.browser-solidity.json'
,
'.remix.config'
)
}
}
}
}
...
...
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