X-Git-Url: http://git.nikiroo.be/?p=fanfix.git;a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2Foutput%2FBasicOutput.java;h=a21ee97e36fba4a33dcf13e15fc890a7eb23fea2;hp=5e82f253c37e47cd535faea739d69f83c4940cd2;hb=10d558d2429c984327f9e5a16933fefe5cc37314;hpb=63985d926fe1649517bc06d8f50761925b4c9984 diff --git a/src/be/nikiroo/fanfix/output/BasicOutput.java b/src/be/nikiroo/fanfix/output/BasicOutput.java index 5e82f25..a21ee97 100644 --- a/src/be/nikiroo/fanfix/output/BasicOutput.java +++ b/src/be/nikiroo/fanfix/output/BasicOutput.java @@ -69,12 +69,17 @@ public abstract class BasicOutput { /** * The default extension to add to the output files. * + * @param readerTarget + * the target to point to to read the {@link Story} (for + * instance, the main entry point if this {@link Story} is in + * a directory bundle) + * * @return the extension */ - public String getDefaultExtension() { + public String getDefaultExtension(boolean readerTarget) { BasicOutput output = BasicOutput.getOutput(this, false); if (output != null) { - return output.getDefaultExtension(); + return output.getDefaultExtension(readerTarget); } return null; @@ -166,7 +171,7 @@ public abstract class BasicOutput { File targetDir = new File(target).getParentFile(); String targetName = new File(target).getName(); - String ext = getDefaultExtension(); + String ext = getDefaultExtension(false); if (ext != null && !ext.isEmpty()) { if (targetName.toLowerCase().endsWith(ext)) { targetName = targetName.substring(0, @@ -239,9 +244,14 @@ public abstract class BasicOutput { /** * The default extension to add to the output files. * + * @param readerTarget + * the target to point to to read the {@link Story} (for + * instance, the main entry point if this {@link Story} is in a + * directory bundle) + * * @return the extension */ - public String getDefaultExtension() { + public String getDefaultExtension(boolean readerTarget) { return ""; }