1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-23 08:18:52 -05:00

Experiment with PGP signed messages

This commit is contained in:
Reinhard Pointner 2018-06-11 16:10:36 +07:00
parent a0d9ca6452
commit 659e25b5ce

View File

@ -8,6 +8,8 @@ public enum LicenseModel {
MicrosoftStore {
private final Resource<Boolean> CHECK = Resource.lazy(() -> !getAppUserModelID().equals("PointPlanck.FileBot"));
@Override
public boolean isAppStore() {
return true;
@ -15,14 +17,20 @@ public enum LicenseModel {
@Override
public void check() throws LicenseError {
if (!getAppUserModelID().equals("PointPlanck.FileBot")) {
try {
if (CHECK.get()) {
throw new LicenseError("Microsoft Store: Desktop Bridge not found");
}
} catch (Exception e) {
throw new IllegalStateException(e);
}
}
},
MacAppStore {
private final Resource<Boolean> CHECK = Resource.lazy(() -> !File.listRoots()[0].canRead());
@Override
public boolean isAppStore() {
return true;
@ -30,8 +38,12 @@ public enum LicenseModel {
@Override
public void check() throws LicenseError {
if (File.listRoots()[0].canRead()) {
throw new LicenseError("Mac App Store: App Sandbox not found");
try {
if (CHECK.get()) {
throw new LicenseError("Microsoft Store: Desktop Bridge not found");
}
} catch (Exception e) {
throw new IllegalStateException(e);
}
}
},