1
0
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:
Reinhard Pointner 2018-07-17 14:15:18 +07:00
parent e751d99e32
commit c0068188be

View File

@ -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());