Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Fix -o option NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
hluwa committed Jan 29, 2021
1 parent 9e778a7 commit 46d0238
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/PrivacyDog.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,12 @@ public static void main(String[] args) {
}

if (commandLine.hasOption("o")) {
if(!(new File(outputPath).exists() && new File(outputPath).isDirectory())){
String o = commandLine.getOptionValue("o");
if(!(new File(o).exists() && new File(o).isDirectory())){
System.err.println("Output need directory path;");
return;
}
outputPath = commandLine.getOptionValue("o");
outputPath = o;
}
} catch (ParseException e) {
e.printStackTrace();
Expand Down

0 comments on commit 46d0238

Please sign in to comment.