Skip to content

Commit 7b0cbfc

Browse files
committed
Bugfix situation when importing an alignment not in the top-level file root
1 parent 78257c4 commit 7b0cbfc

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

SequenceAnalysis/resources/web/SequenceAnalysis/panel/AlignmentImportPanel.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -723,13 +723,19 @@ Ext4.define('SequenceAnalysis.panel.AlignmentImportPanel', {
723723
if (rec.get('error'))
724724
totalErrors++;
725725
else {
726-
if (!rec.get('fileId'))
727-
fields.inputFiles.push({
728-
fileName: rec.get('fileName'),
729-
relPath: rec.get('relPath')
730-
});
731-
else
726+
if (!rec.get('fileId')) {
727+
var recIdx = this.fileNameStore.find('fileName', rec.get('fileName'));
728+
if (recIdx > -1) {
729+
var r = this.fileNameStore.getAt(recIdx);
730+
fields.inputFiles.push({
731+
fileName: r.get('fileName'),
732+
relPath: r.get('relPath')
733+
});
734+
}
735+
}
736+
else {
732737
fields.inputFiles.push({dataId: rec.get('fileId')});
738+
}
733739
}
734740
}, this);
735741

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ else if (o.containsKey("relPath") || o.containsKey("fileName"))
21482148

21492149
if (f == null || !f.exists())
21502150
{
2151-
throw new PipelineValidationException("Unknown file: " + o.getString("relPath"));
2151+
throw new PipelineValidationException("Unknown file: " + o.getString("relPath") + " / " + o.getString("fileName"));
21522152
}
21532153

21542154
ret.add(f);

0 commit comments

Comments
 (0)