Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ICAT
ids-server.1.8.0-patched DEPRECATED
Commits
bfbf2e90
Commit
bfbf2e90
authored
Jul 18, 2019
by
Alejandro De Maria Antolinos
Browse files
It fixes
#2
parent
27d684bf
Changes
2
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
bfbf2e90
...
...
@@ -4,7 +4,7 @@
<groupId>
org.icatproject
</groupId>
<artifactId>
ids.server
</artifactId>
<packaging>
war
</packaging>
<version>
1.8.
0
-patched
</version>
<version>
1.8.
1
-patched
</version>
<name>
IDS Server
</name>
<properties>
...
...
src/main/java/org/icatproject/ids/thread/DsRestorer.java
View file @
bfbf2e90
...
...
@@ -77,6 +77,13 @@ public class DsRestorer implements Runnable {
nameToLocalMap
.
put
(
datafile
.
getName
(),
IdsBean
.
getLocation
(
datafile
.
getId
(),
datafile
.
getLocation
()));
size
+=
datafile
.
getFileSize
();
n
++;
/** ESRF: Removing the "/" for bad ingested files that needs database fixing **/
if
(
datafile
.
getName
().
startsWith
(
"/"
)){
nameToLocalMap
.
put
(
datafile
.
getName
().
substring
(
1
),
IdsBean
.
getLocation
(
datafile
.
getId
(),
datafile
.
getLocation
()));
logger
.
debug
(
"ESRF fix: Adding to the map: "
+
datafile
.
getName
().
substring
(
1
));
}
}
logger
.
debug
(
"Restoring dataset "
+
dsInfo
.
getInvId
()
+
"/"
+
dsInfo
.
getDsId
()
+
" with "
+
n
...
...
@@ -92,7 +99,12 @@ public class DsRestorer implements Runnable {
ZipInputStream
zis
=
new
ZipInputStream
(
Files
.
newInputStream
(
datasetCachePath
));
ZipEntry
ze
=
zis
.
getNextEntry
();
while
(
ze
!=
null
)
{
logger
.
debug
(
"Getting name: "
+
ze
.
getName
());
String
dfName
=
zipMapper
.
getFileName
(
ze
.
getName
());
logger
.
debug
(
"dfName: "
+
dfName
);
String
location
=
nameToLocalMap
.
get
(
dfName
);
if
(
location
==
null
)
{
logger
.
error
(
"Unable to store "
+
dfName
+
" into "
+
dsInfo
+
" as no location found"
);
...
...
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