mirror of
https://github.com/haraldk/TwelveMonkeys.git
synced 2025-08-02 19:15: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 File SIPS_COMMAND = new File("/usr/bin/sips");
|
||||||
private static final boolean SIPS_EXISTS_AND_EXECUTES = existsAndExecutes(SIPS_COMMAND);
|
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) {
|
private static boolean existsAndExecutes(final File cmd) {
|
||||||
try {
|
try {
|
||||||
return cmd.exists() && cmd.canExecute();
|
return cmd.exists() && cmd.canExecute();
|
||||||
}
|
}
|
||||||
catch (SecurityException ignore) {
|
catch (SecurityException ignore) {
|
||||||
|
if (DEBUG) {
|
||||||
|
ignore.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user