feat: v0.5.1, fix open blank window when decrypt fails
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package me.hatter.tools.tinyencrypt.config;
|
||||
|
||||
public class TinyEncryptConstant {
|
||||
public static final String VERSION = "0.5.0";
|
||||
public static final String VERSION = "0.5.1";
|
||||
|
||||
public static final String ENC_FILE_EXT = ".tinyenc";
|
||||
}
|
||||
|
||||
@@ -112,7 +112,10 @@ public class EncryptedFileUtil {
|
||||
public static void decryptInWindow(TinyEncryptConfig config, File file, boolean pgp, boolean editable) {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
AtomicReference<TinyEncryptMeta> metaRef = new AtomicReference<>();
|
||||
decryptToOutputStream(config, file, baos, pgp, metaRef);
|
||||
boolean decryptSuccess = decryptToOutputStream(config, file, baos, pgp, metaRef);
|
||||
if (!decryptSuccess) {
|
||||
return;
|
||||
}
|
||||
|
||||
String decrypted = new String(baos.toByteArray(), StandardCharsets.UTF_8);
|
||||
String editResult = SwingWindow.create((editable ? "Edit" : "View") + " file: " + file.getName())
|
||||
|
||||
Reference in New Issue
Block a user