Add support for absolute paths to CreateContactSheet
This commit is contained in:
parent
9b9659be71
commit
b591553c86
|
@ -66,7 +66,10 @@ public class CreateContactSheet extends AbstractPlaceholderAwarePostProcessor {
|
|||
color},
|
||||
new StringBuffer(), null).toString();
|
||||
File executionDir = rec.getPostProcessedFile().isDirectory() ? rec.getPostProcessedFile() : rec.getPostProcessedFile().getParentFile();
|
||||
File output = new File(executionDir, fillInPlaceHolders(filename, ctx));
|
||||
File output = getOutputFile(executionDir, filename, ctx);
|
||||
if (!output.getParentFile().exists()) {
|
||||
Files.createDirectories(output.toPath().getParent());
|
||||
}
|
||||
|
||||
String[] args = {
|
||||
"-y",
|
||||
|
@ -95,6 +98,17 @@ public class CreateContactSheet extends AbstractPlaceholderAwarePostProcessor {
|
|||
return true;
|
||||
}
|
||||
|
||||
private File getOutputFile(File executionDir, String filename, PostProcessingContext ctx) {
|
||||
String finalFilename = fillInPlaceHolders(filename, ctx);
|
||||
File output;
|
||||
if (new File(finalFilename).isAbsolute()) {
|
||||
output = new File(finalFilename);
|
||||
} else {
|
||||
output = new File(executionDir, finalFilename);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
|
||||
private Path createThumbnails(Recording rec, Config config) throws IOException, InterruptedException {
|
||||
Path tempDirectory = Files.createTempDirectory("ctbrec-contactsheet-" + rec.getModel().getSanitizedNamed());
|
||||
File executionDir = rec.getPostProcessedFile().isDirectory() ? rec.getPostProcessedFile() : rec.getPostProcessedFile().getParentFile();
|
||||
|
|
Loading…
Reference in New Issue