Fix remote timeot (try1) + reverse e621 /post/
[nikiroo-utils.git] / src / be / nikiroo / fanfix / Main.java
index a61c5292d2e5a95076e03585856bd0254a444e13..41206560a3bde407bf0d1f12ddc1f9081dc00d4d 100644 (file)
@@ -351,6 +351,20 @@ public class Main {
                        }
                }
 
+               // We cannot do it when in GUI mode, because it is async...
+               // So if we close the temp files before it is actually used,
+               // we have a problem...
+               // TODO: close it at the correct time (for now, finalize try to do it)
+               if (false) {
+                       try {
+                               Instance.getTempFiles().close();
+                       } catch (IOException e) {
+                               Instance.getTraceHandler().error(
+                                               new IOException(
+                                                               "Cannot dispose of the temporary files", e));
+                       }
+               }
+
                if (exitCode == 255) {
                        syntax(false);
                }
@@ -506,7 +520,7 @@ public class Main {
         * 
         * @return the exit return code (0 = success)
         */
-       private static int convert(String urlString, String typeString,
+       public static int convert(String urlString, String typeString,
                        String target, boolean infoCover, Progress pg) {
                int exitCode = 0;