Skip to content

Commit

Permalink
tiffcomment: fix -version, -no-upgrade, -debug, -trace
Browse files Browse the repository at this point in the history
  • Loading branch information
melissalinkert committed Dec 10, 2024
1 parent 862723a commit f33369f
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

import loci.common.Constants;
import loci.common.DataTools;
import loci.common.DebugTools;
import loci.common.RandomAccessInputStream;
import loci.common.RandomAccessOutputStream;
import loci.formats.FormatException;
Expand Down Expand Up @@ -73,8 +74,6 @@ public static void main(String[] args) throws FormatException, IOException {
return;
}

CommandLineTools.runUpgradeCheck(args);

// parse flags
boolean edit = false;
String newComment = null;
Expand Down Expand Up @@ -106,9 +105,22 @@ else if (newComment.equals("-")) {
}
}
}
else System.out.println("Warning: unknown flag: " + args[i]);
else if (args[i].equals(CommandLineTools.VERSION)) {
CommandLineTools.printVersion();
}
else if (args[i].equals("-debug")) {
DebugTools.setRootLevel("DEBUG");
}
else if (args[i].equals("-trace")) {
DebugTools.setRootLevel("TRACE");
}
else if (!args[i].equals(CommandLineTools.NO_UPGRADE_CHECK)) {
System.out.println("Warning: unknown flag: " + args[i]);
}
}

CommandLineTools.runUpgradeCheck(args);

// process files
for (String file : files) {
if (edit) {
Expand Down

0 comments on commit f33369f

Please sign in to comment.