Commit bfbf2e90 authored by Alejandro De Maria Antolinos's avatar Alejandro De Maria Antolinos
Browse files

It fixes #2

parent 27d684bf
......@@ -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>
......
......@@ -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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment