Skip to content

Commit ce11f9a

Browse files
committed
Adjust error, use resolveFile()
1 parent e219ea4 commit ce11f9a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2202,12 +2202,15 @@ public Object execute(ImportFastaSequencesForm form, BindException errors) throw
22022202
//resolve files
22032203
List<File> files = new ArrayList<>();
22042204
PipeRoot root = PipelineService.get().getPipelineRootSetting(getContainer());
2205-
FileLike baseDir = null != root ? root.getRootFileLike() : null;
2206-
if (baseDir == null)
2205+
2206+
if (root == null)
22072207
{
22082208
errors.reject(ERROR_MSG, "Pipeline root not configured");
22092209
return null;
22102210
}
2211+
2212+
FileLike baseDir = StringUtils.trimToNull(form.getPath()) == null ? root.getRootFileLike() : root.getRootFileLike().resolveFile(new Path(form.getPath()));
2213+
22112214
if (!baseDir.exists())
22122215
{
22132216
errors.reject(ERROR_MSG, "Unable to find directory: " + baseDir.getPath());

0 commit comments

Comments
 (0)