Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
JAliEn
JAliEn
Commits
1add0410
Commit
1add0410
authored
Jun 01, 2018
by
Costin Grigoras
Browse files
Go up one level if the archive member is in a subfolder
parent
0ac80d6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/alien/catalogue/LFNUtils.java
View file @
1add0410
...
...
@@ -1235,12 +1235,17 @@ public class LFNUtils {
UUID
guid
=
null
;
String
zipMember
=
null
;
final
Set
<
PFN
>
listing
=
file
.
whereis
();
if
(
listing
!=
null
)
for
(
final
PFN
p
:
listing
)
if
(
p
.
pfn
!=
null
&&
p
.
pfn
.
startsWith
(
"guid:/"
))
try
{
guid
=
UUID
.
fromString
(
p
.
pfn
.
substring
(
p
.
pfn
.
lastIndexOf
(
'/'
)
+
1
,
p
.
pfn
.
indexOf
(
'?'
)));
guid
=
UUID
.
fromString
(
p
.
pfn
.
substring
(
p
.
pfn
.
lastIndexOf
(
'/'
,
p
.
pfn
.
indexOf
(
'?'
))
+
1
,
p
.
pfn
.
indexOf
(
'?'
)));
zipMember
=
p
.
pfn
.
substring
(
p
.
pfn
.
indexOf
(
'?'
)
+
1
);
break
;
}
catch
(
final
Exception
e
)
{
logger
.
log
(
Level
.
WARNING
,
"Failed to parse guid "
,
e
);
...
...
@@ -1252,6 +1257,10 @@ public class LFNUtils {
try
{
LFN
parentDir
=
file
.
getParentDir
();
if
(
zipMember
!=
null
&&
zipMember
.
indexOf
(
'/'
)
>
0
&&
parentDir
!=
null
)
parentDir
=
parentDir
.
getParentDir
();
if
(
parentDir
!=
null
&&
parentDir
.
list
()
!=
null
)
for
(
final
LFN
otherFile
:
parentDir
.
list
())
if
(
otherFile
.
isFile
()
&&
otherFile
.
guid
!=
null
&&
otherFile
.
guid
.
equals
(
guid
))
...
...
Write
Preview
Supports
Markdown
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