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
b4ba04d6
Unverified
Commit
b4ba04d6
authored
Sep 30, 2019
by
yann300
Committed by
GitHub
Sep 30, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2372 from ethereum/fix_removing_storage
Do not remove the old file structure
parents
5aa8cd85
ac2a0d13
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
migrateFileSystem.js
src/migrateFileSystem.js
+6
-2
No files found.
src/migrateFileSystem.js
View file @
b4ba04d6
...
@@ -6,13 +6,17 @@ import { Storage } from 'remix-lib'
...
@@ -6,13 +6,17 @@ import { Storage } from 'remix-lib'
*/
*/
export
default
(
fileProvider
)
=>
{
export
default
(
fileProvider
)
=>
{
const
fileStorage
=
new
Storage
(
'sol:'
)
const
fileStorage
=
new
Storage
(
'sol:'
)
if
(
fileStorage
.
keys
().
length
===
0
)
return
const
flag
=
'status'
const
fileStorageBrowserFS
=
new
Storage
(
'remix_browserFS_migration:'
)
if
(
fileStorageBrowserFS
.
get
(
flag
)
===
'done'
)
return
fileStorage
.
keys
().
forEach
((
path
)
=>
{
fileStorage
.
keys
().
forEach
((
path
)
=>
{
if
(
path
!==
'.remix.config'
)
{
if
(
path
!==
'.remix.config'
)
{
const
content
=
fileStorage
.
get
(
path
)
const
content
=
fileStorage
.
get
(
path
)
fileProvider
.
set
(
path
,
content
)
fileProvider
.
set
(
path
,
content
)
fileStorage
.
remove
(
path
)
// TODO https://github.com/ethereum/remix-ide/issues/2377
// fileStorage.remove(path) we don't want to remove it as we are still supporting the old version
console
.
log
(
'file migrated'
,
path
)
console
.
log
(
'file migrated'
,
path
)
}
}
})
})
fileStorageBrowserFS
.
set
(
flag
,
'done'
)
}
}
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