Skip to content

Commit

Permalink
Added Open With apps for macOS - addressed PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
pskowronek authored and ahadas committed May 15, 2023
1 parent f83b204 commit 6e8bbf3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private void populate() {
}).start();
} else {
if (DesktopManager.canEnableOpenWithApps()) {
if (getItemCount() > 1) {
if (getItemCount() > 0) {
add(new JSeparator());
}
var howToEnable = super.add(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public class OSXDesktopAdapter extends DefaultDesktopAdapter {
private static final String DEFAULT_SHELL_INTERACTIVE = "--login";

// cached values
private String dutiCmdPath = null;
private String dutiCmdPath;

private Map<String, String> utiForExt = createSizeLimitedMap(200);

Expand Down Expand Up @@ -450,9 +450,10 @@ private String getPathOfDutiCmd() {
}
return false; // continue searching
});
if (dutiCmdPath != null && dutiCmdPath.length() > 0) {
if (dutiCmdPath != null && !dutiCmdPath.isEmpty()) {
LOGGER.info("Command 'duti' found here: {}", dutiCmdPath);
} else {
dutiCmdPath = null; // nullify if was empty
LOGGER.error("Command 'duti' not found");
}
return dutiCmdPath;
Expand Down

0 comments on commit 6e8bbf3

Please sign in to comment.