Skip to content
Snippets Groups Projects
Commit a0705375 authored by drm's avatar drm
Browse files

Fix XNAT-4291. Path of destination dir incorrect in prearchive when session...

Fix XNAT-4291. Path of destination dir incorrect in prearchive when session moved from unassigned to an existing project.
parent a4b179c5
No related branches found
No related tags found
No related merge requests found
...@@ -34,6 +34,7 @@ import java.io.ByteArrayInputStream; ...@@ -34,6 +34,7 @@ import java.io.ByteArrayInputStream;
import java.io.File; import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
import java.sql.SQLException; import java.sql.SQLException;
import java.util.List; import java.util.List;
...@@ -203,7 +204,8 @@ public class FileSystemSessionDataModifier implements SessionDataModifierI { ...@@ -203,7 +204,8 @@ public class FileSystemSessionDataModifier implements SessionDataModifierI {
this.newProject = newProject; this.newProject = newProject;
this.f = new File(this.uri); this.f = new File(this.uri);
this.timestampDir = f.getParentFile(); this.timestampDir = f.getParentFile();
this.newTimestampDir = new File(this.basePath + this.newProject, this.timestampDir.getName()); Path newTimestampDirPath = Paths.get( this.basePath, this.newProject, this.timestampDir.getName());
this.newTimestampDir = newTimestampDirPath.normalize().toFile();
this.xml = new File(timestampDir, session + ".xml"); this.xml = new File(timestampDir, session + ".xml");
copy = new Copy(timestampDir, newTimestampDir, session); copy = new Copy(timestampDir, newTimestampDir, session);
setXml = new SetXml(xml, newProject, (new File(newTimestampDir, session)).getAbsolutePath()); setXml = new SetXml(xml, newProject, (new File(newTimestampDir, session)).getAbsolutePath());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment