mirror of
https://github.com/mitb-archive/filebot
synced 2024-08-13 17:03:45 -04:00
require non-empty license file
This commit is contained in:
parent
e751d99e32
commit
c0068188be
@ -81,11 +81,12 @@ public class License {
|
||||
}
|
||||
|
||||
public static License parseLicenseFile(File file) {
|
||||
if (!file.exists()) {
|
||||
return new License(new FileNotFoundException("UNREGISTERED"));
|
||||
}
|
||||
|
||||
try {
|
||||
// require non-empty license file
|
||||
if (file.length() <= 0) {
|
||||
throw new FileNotFoundException("UNREGISTERED");
|
||||
}
|
||||
|
||||
// read and verify license file
|
||||
byte[] bytes = Files.readAllBytes(file.toPath());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user