Skip to content

Commit

Permalink
added check for PBO-file that it actually has the .pbo extension
Browse files Browse the repository at this point in the history
  • Loading branch information
Krzmbrzl committed Sep 11, 2018
1 parent 7d7e227 commit d9001ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ArmaFiles/src/raven/pbo/PBO.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ protected void validate(File file) {
if (!file.isFile()) {
throw new IllegalArgumentException("The given file is not actually a file!");
}
if (!file.getName().toLowerCase().endsWith(".pbo")) {
throw new IllegalArgumentException("The given file does not have the .pbo extentsion!");
}
}

/**
Expand Down

0 comments on commit d9001ce

Please sign in to comment.