Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Gitlab will go into maintenance Friday 3rd February from 9:00 to 10:00
Open sidebar
Devrim Gunyel
core
Commits
1653ddaa
Commit
1653ddaa
authored
Oct 17, 2019
by
Piotr Gawron
Browse files
filename cases are preserved in uploaded zip files
parent
b978534a
Changes
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
1653ddaa
...
...
@@ -20,6 +20,7 @@ minerva (14.0.3) stable; urgency=medium
(
below
14.0.0
)
didn
't produce valid SBML (#970)
* Bug fix: fields in add project window are reinitialized after each open
(#963)
* Bug fix: filename case in uploaded zip files is preserved (#964)
-- Piotr Gawron <piotr.gawron@uni.lu> Wed, 16 Oct 2019 9:00:00 +0200
...
...
frontend-js/src/main/js/gui/admin/AddProjectDialog.js
View file @
1653ddaa
...
...
@@ -1429,22 +1429,23 @@ AddProjectDialog.prototype.createZipEntry = function (jsZipEntry, zipObject) {
if
(
jsZipEntry
.
dir
)
{
return
null
;
}
var
filename
=
jsZipEntry
.
name
.
toLowerCase
();
var
filename
=
jsZipEntry
.
name
;
var
lowercaseFilename
=
jsZipEntry
.
name
.
toLowerCase
();
var
type
;
var
data
=
{};
var
processingPromise
=
Promise
.
resolve
();
if
(
this
.
isIgnoredZipEntry
(
f
ilename
))
{
if
(
this
.
isIgnoredZipEntry
(
lowercaseF
ilename
))
{
type
=
undefined
;
}
else
if
(
f
ilename
.
indexOf
(
"
submaps
"
)
===
0
)
{
}
else
if
(
lowercaseF
ilename
.
indexOf
(
"
submaps
"
)
===
0
)
{
type
=
"
MAP
"
;
if
(
f
ilename
.
endsWith
(
"
mapping.xml
"
))
{
if
(
lowercaseF
ilename
.
endsWith
(
"
mapping.xml
"
))
{
data
.
mapping
=
true
;
}
}
else
if
(
f
ilename
.
indexOf
(
"
images
"
)
===
0
)
{
}
else
if
(
lowercaseF
ilename
.
indexOf
(
"
images
"
)
===
0
)
{
type
=
"
IMAGE
"
;
}
else
if
(
f
ilename
.
indexOf
(
"
glyphs
"
)
===
0
)
{
}
else
if
(
lowercaseF
ilename
.
indexOf
(
"
glyphs
"
)
===
0
)
{
type
=
"
GLYPH
"
;
}
else
if
(
f
ilename
.
indexOf
(
"
layouts
"
)
===
0
||
f
ilename
.
indexOf
(
"
overlays
"
)
===
0
)
{
}
else
if
(
lowercaseF
ilename
.
indexOf
(
"
layouts
"
)
===
0
||
lowercaseF
ilename
.
indexOf
(
"
overlays
"
)
===
0
)
{
type
=
"
OVERLAY
"
;
processingPromise
=
zipObject
.
file
(
jsZipEntry
.
name
).
async
(
"
string
"
).
then
(
function
(
content
)
{
var
overlayParser
=
new
OverlayParser
();
...
...
@@ -1460,7 +1461,7 @@ AddProjectDialog.prototype.createZipEntry = function (jsZipEntry, zipObject) {
data
.
description
=
""
;
}
});
}
else
if
(
f
ilename
.
indexOf
(
"
\\
"
)
===
-
1
&&
f
ilename
.
indexOf
(
"
/
"
)
===
-
1
)
{
}
else
if
(
lowercaseF
ilename
.
indexOf
(
"
\\
"
)
===
-
1
&&
lowercaseF
ilename
.
indexOf
(
"
/
"
)
===
-
1
)
{
type
=
"
MAP
"
;
data
.
root
=
true
;
}
else
{
...
...
@@ -1472,7 +1473,7 @@ AddProjectDialog.prototype.createZipEntry = function (jsZipEntry, zipObject) {
"
'>manual</a> for information about allowed zip file content
"
);
}
if
(
type
===
"
MAP
"
)
{
var
name
=
jsZipEntry
.
name
.
toLowerCase
()
;
var
name
=
filename
;
processingPromise
=
zipObject
.
file
(
jsZipEntry
.
name
).
async
(
"
string
"
).
then
(
function
(
content
)
{
self
.
setFileParserForFilename
(
name
,
content
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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