Skip to content

Commit e7e1e62

Browse files
committed
Add comment. Revert change.
1 parent 9fd5bb6 commit e7e1e62

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

api/src/org/labkey/api/reports/report/r/RReportJob.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -277,12 +277,15 @@ protected void processOutputs(RReport report, List<ParamReplacement> outputSubst
277277
FileLike parentDir = report.getBackgroundOutputDirFileLike(getJob().getContainerId());
278278
FileLike substitutionMap;
279279

280-
if (!reportDir.equals(parentDir))
280+
// ScriptEngineReport#getReportDirFileLike() appends the ThreadLocal job identifier only
281+
// when background execution needs a per-job child directory under parentDir.
282+
boolean hasJobSpecificReportDir = !reportDir.equals(parentDir);
283+
if (hasJobSpecificReportDir)
281284
{
282285
// clean up the destination folder
283286
for (FileLike file : parentDir.getChildren())
284287
{
285-
if (!file.isFile() && !"log".equalsIgnoreCase(FileUtil.getExtension(file)))
288+
if (!file.isDirectory() && !"log".equalsIgnoreCase(FileUtil.getExtension(file)))
286289
{
287290
getJob().debug("deleting parent file=" + file);
288291
file.delete();

0 commit comments

Comments
 (0)