X-Git-Url: http://git.nikiroo.be/?a=blobdiff_plain;f=src%2Fbe%2Fnikiroo%2Ffanfix%2FMain.java;h=1e4daa801b9b852de9bb91f0964fd7d73d176864;hb=9948521df6779543a26fd260994d5b9029d1eab5;hp=e1b9c650c328b91a47c57d4b2e4f97c38262c265;hpb=f7460e4c44772dfb5fc5a421e33b4fba7eae94d3;p=nikiroo-utils.git diff --git a/src/be/nikiroo/fanfix/Main.java b/src/be/nikiroo/fanfix/Main.java index e1b9c65..1e4daa8 100644 --- a/src/be/nikiroo/fanfix/Main.java +++ b/src/be/nikiroo/fanfix/Main.java @@ -221,6 +221,9 @@ public class Main { int diff = progress.getProgress() - current; current += diff; + if (diff <= 0) + return; + StringBuilder builder = new StringBuilder(); for (int i = 0; i < diff; i++) { builder.append('.'); @@ -351,6 +354,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); }