From a1c6251150332dca32b442199b1f7fe6a953b953 Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Mon, 13 Aug 2018 19:09:28 +0700 Subject: [PATCH] Try to fix 32-bit MWS support --- source/net/filebot/LicenseModel.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/net/filebot/LicenseModel.java b/source/net/filebot/LicenseModel.java index 66b83fd6..b2e06e8e 100644 --- a/source/net/filebot/LicenseModel.java +++ b/source/net/filebot/LicenseModel.java @@ -2,14 +2,13 @@ package net.filebot; import static java.nio.file.Files.*; import static java.nio.file.Paths.*; - -import java.io.File; +import static net.filebot.platform.windows.WinAppUtilities.*; public enum LicenseModel { MicrosoftStore { - private final Resource AUMID = Resource.lazy(() -> File.pathSeparatorChar == ';' && System.getProperty("java.home").contains("PointPlanck.FileBot") && !isWritable(get(System.getProperty("java.class.path")))); + private final Resource AUMID = Resource.lazy(() -> getPackageAppUserModelID().equals("PointPlanck.FileBot")); @Override public Object check() throws LicenseError { @@ -27,7 +26,7 @@ public enum LicenseModel { MacAppStore { - private final Resource SANDBOX = Resource.lazy(() -> File.pathSeparatorChar == ':' && System.getenv("APP_SANDBOX_CONTAINER_ID").equals("net.filebot.FileBot") && !isReadable(get("/tmp"))); + private final Resource SANDBOX = Resource.lazy(() -> System.getenv("APP_SANDBOX_CONTAINER_ID").equals("net.filebot.FileBot") && !isReadable(get("/tmp"))); @Override public Object check() throws LicenseError {