Version 1.2.0: better UI, some fixes
[fanfix.git] / src / be / nikiroo / fanfix / output / BasicOutput.java
index 5e82f253c37e47cd535faea739d69f83c4940cd2..a21ee97e36fba4a33dcf13e15fc890a7eb23fea2 100644 (file)
@@ -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 "";
        }