Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cribjs-editor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Cédric Le Ninivin
cribjs-editor
Commits
0c3406ff
Commit
0c3406ff
authored
Sep 25, 2020
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LandingGadget: Fix Case when there is only one file in the zip
parent
6bd580b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
gadget/gadget_landing_cribjs.js
gadget/gadget_landing_cribjs.js
+6
-6
No files found.
gadget/gadget_landing_cribjs.js
View file @
0c3406ff
...
@@ -12,13 +12,13 @@
...
@@ -12,13 +12,13 @@
zip
.
forEach
(
function
(
relativePath
,
zipEntry
)
{
zip
.
forEach
(
function
(
relativePath
,
zipEntry
)
{
path_list
.
push
(
relativePath
);
path_list
.
push
(
relativePath
);
});
});
if
(
path_list
)
{
if
(
path_list
&&
path_list
.
length
>
1
)
{
root_path
=
path_list
[
0
].
split
(
"
/
"
)[
0
];
root_path
=
path_list
[
0
].
split
(
"
/
"
)[
0
];
}
for
(
i
=
0
;
i
<
path_list
.
length
-
1
;
i
++
)
{
for
(
i
=
0
;
i
<
path_list
.
length
-
1
;
i
++
)
{
if
(
root_path
!==
path_list
[
i
].
split
(
"
/
"
)[
0
]
)
{
if
(
root_path
!==
path_list
[
i
].
split
(
"
/
"
)[
0
])
{
root_path
=
""
;
root_path
=
""
;
break
;
break
;
}
}
}
}
}
if
(
root_path
!==
""
&&
!
from_path
)
{
if
(
root_path
!==
""
&&
!
from_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