feat: add readonly from env

This commit is contained in:
2023-12-08 22:55:24 +08:00
parent 41627c2779
commit 580dd4fe72

View File

@@ -36,7 +36,10 @@ public class Main {
final Bytes decrypted = AESCryptTool.gcmDecrypt(keyBytes, nonceBytes).from(file).toBytes(); final Bytes decrypted = AESCryptTool.gcmDecrypt(keyBytes, nonceBytes).from(file).toBytes();
final boolean readonly = StringUtil.isOn(System.getProperty("readonly")); final boolean readonly = StringUtil.isOn(StringUtil.def(
System.getenv("READONLY"),
System.getProperty("readonly"))
);
final FutureResult futureResult = showWindow("Secure edit file", final FutureResult futureResult = showWindow("Secure edit file",
decrypted.string(), decrypted.string(),
"File is encrypted in temp file", "File is encrypted in temp file",