Skip to content

Commit e6ecde0

Browse files
safely handle relative path
1 parent d84a997 commit e6ecde0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/SequenceAnalysisController.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2016,30 +2016,30 @@ else if (!d.getFile().exists())
20162016
}
20172017
else if (o.has("relPath") || o.has("fileName"))
20182018
{
2019-
File f;
2019+
FileLike f;
20202020
if (o.opt("relPath") == null)
20212021
{
20222022
if (path != null)
20232023
{
2024-
f = pr.resolvePath(path);
2025-
f = FileUtil.appendName(f, o.getString("fileName"));
2024+
f = pr.resolvePathToFileLike(path);
2025+
f = f.resolveFile(Path.parse(o.getString("fileName")));
20262026
}
20272027
else
20282028
{
2029-
f = pr.resolvePath(o.getString("fileName"));
2029+
f = pr.resolvePathToFileLike(o.getString("fileName"));
20302030
}
20312031
}
20322032
else
20332033
{
2034-
f = pr.resolvePath(o.getString("relPath"));
2034+
f = pr.resolvePathToFileLike(o.getString("relPath"));
20352035
}
20362036

20372037
if (f == null || !f.exists())
20382038
{
20392039
throw new PipelineValidationException("Unknown file: " + o.getString("relPath") + " / " + o.getString("fileName"));
20402040
}
20412041

2042-
ret.add(f);
2042+
ret.add(f.toNioPathForRead().toFile());
20432043
}
20442044
else if (o.opt("filePath") != null)
20452045
{

0 commit comments

Comments
 (0)