Ensure .out files are saved into logDirectory
Signed-off-by: Khalid Shakir <kshakir@broadinstitute.org>
This commit is contained in:
parent
51dcd364a5
commit
504c125c26
|
|
@ -377,9 +377,18 @@ trait QFunction extends Logging with QJobReport {
|
||||||
jobName = qSettings.runName + "-" + this.addOrder.mkString("-")
|
jobName = qSettings.runName + "-" + this.addOrder.mkString("-")
|
||||||
|
|
||||||
if (jobOutputFile == null) {
|
if (jobOutputFile == null) {
|
||||||
|
/*If the outputFile has been set to an absolute path, respect that.
|
||||||
|
Otherwise, place it in (possibly a subdirectory of) the log directory
|
||||||
|
The relative case is first as it's arguably the most common condition
|
||||||
|
*/
|
||||||
jobOutputFile = firstOutput match {
|
jobOutputFile = firstOutput match {
|
||||||
case file: File if (!IOUtils.isSpecialFile(file)) => new File(file.getParentFile, file.getName + ".out")
|
case file: File if (!IOUtils.isSpecialFile(file) && !file.isAbsolute) => {
|
||||||
case _ => new File(jobName + ".out")
|
val logDir : File = if (file.getParentFile() == null) qSettings.logDirectory else new File(qSettings.logDirectory, file.getParent)
|
||||||
|
new File(logDir, file.getName + ".out")
|
||||||
|
}
|
||||||
|
case file: File if (!IOUtils.isSpecialFile(file) && file.isAbsolute) =>
|
||||||
|
new File(file.getParentFile, file.getName + ".out")
|
||||||
|
case _ => new File(qSettings.logDirectory, jobName + ".out")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue