Skip to content

Commit ded07f6

Browse files
committed
Avoid error re-downloading SRA data if lot does not already exist
1 parent 1998182 commit ded07f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/RestoreSraDataHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public void processFilesRemote(List<Readset> readsets, JobContext ctx) throws Un
206206
Pair<File, File> files = wrapper.downloadSra(accession, ctx.getOutputDir());
207207

208208
File sraLog = new File(expectedFile1.getParentFile(), FileUtil.makeLegalName("sraDownload_" + timestamp + ".txt"));
209-
try (PrintWriter writer = PrintWriters.getPrintWriter(IOUtil.openFileForWriting(sraLog, true)))
209+
try (PrintWriter writer = PrintWriters.getPrintWriter(IOUtil.openFileForWriting(sraLog, sraLog.exists())))
210210
{
211211
ctx.getLogger().info("Copying file to: " + expectedFile1.getPath());
212212
Files.copy(files.first.toPath(), expectedFile1.toPath());

0 commit comments

Comments
 (0)