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
b57cfbac
Commit
b57cfbac
authored
Sep 09, 2021
by
bunsenstraat
Committed by
davidzagi93@gmail.com
Sep 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check dir exists
parent
d6d7ea64
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
dgitProvider.js
apps/remix-ide/src/app/files/dgitProvider.js
+6
-2
No files found.
apps/remix-ide/src/app/files/dgitProvider.js
View file @
b57cfbac
...
@@ -432,12 +432,13 @@ class DGitProvider extends Plugin {
...
@@ -432,12 +432,13 @@ class DGitProvider extends Plugin {
const
dir
=
path
.
dirname
(
file
.
path
)
const
dir
=
path
.
dirname
(
file
.
path
)
try
{
try
{
this
.
createDirectories
(
`
${
workspace
.
absolutePath
}
/
${
dir
}
`
)
this
.
createDirectories
(
`
${
workspace
.
absolutePath
}
/
${
dir
}
`
)
}
catch
(
e
)
{
}
}
catch
(
e
)
{
throw
new
Error
(
e
)
}
try
{
try
{
window
.
remixFileSystem
.
writeFileSync
(
`
${
workspace
.
absolutePath
}
/
${
file
.
path
}
`
,
Buffer
.
concat
(
content
)
||
new
Uint8Array
())
window
.
remixFileSystem
.
writeFileSync
(
`
${
workspace
.
absolutePath
}
/
${
file
.
path
}
`
,
Buffer
.
concat
(
content
)
||
new
Uint8Array
())
}
catch
(
e
)
{
}
}
catch
(
e
)
{
throw
new
Error
(
e
)
}
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
throw
new
Error
(
e
)
}
}
return
result
return
result
}
}
...
@@ -517,8 +518,11 @@ class DGitProvider extends Plugin {
...
@@ -517,8 +518,11 @@ class DGitProvider extends Plugin {
if
(
i
>
0
)
previouspath
=
'/'
+
directories
.
slice
(
0
,
i
).
join
(
'/'
)
if
(
i
>
0
)
previouspath
=
'/'
+
directories
.
slice
(
0
,
i
).
join
(
'/'
)
const
finalPath
=
previouspath
+
'/'
+
directories
[
i
]
const
finalPath
=
previouspath
+
'/'
+
directories
[
i
]
try
{
try
{
if
(
!
window
.
remixFileSystem
.
existsSync
(
finalPath
))
{
window
.
remixFileSystem
.
mkdirSync
(
finalPath
)
window
.
remixFileSystem
.
mkdirSync
(
finalPath
)
}
}
catch
(
e
)
{
}
catch
(
e
)
{
console
.
log
(
e
)
}
}
}
}
}
}
...
...
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