mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-02 11:05:29 -04:00
TMI-ICNS: Added debug for sips command.
This commit is contained in:
parent
b966254322
commit
0ffd7cacc4
@ -54,12 +54,16 @@ final class SipsJP2Reader {
|
||||
|
||||
private static final File SIPS_COMMAND = new File("/usr/bin/sips");
|
||||
private static final boolean SIPS_EXISTS_AND_EXECUTES = existsAndExecutes(SIPS_COMMAND);
|
||||
private static final boolean DEBUG = "true".equalsIgnoreCase(System.getProperty("com.twelvemonkeys.imageio.plugins.icns.debug"));
|
||||
|
||||
private static boolean existsAndExecutes(final File cmd) {
|
||||
try {
|
||||
return cmd.exists() && cmd.canExecute();
|
||||
}
|
||||
catch (SecurityException ignore) {
|
||||
if (DEBUG) {
|
||||
ignore.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user