mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-05-30 08:26:35 +00:00
Added #1845 Show warning on opening file in Read only mode (binary search, unknown extensions, etc.)
Added #1845 Show error message on saving in Read only mode, "Save As" must be used
This commit is contained in:
@@ -839,6 +839,14 @@ public class Main {
|
||||
|
||||
Stopwatch sw = Stopwatch.startNew();
|
||||
if (bundle != null) {
|
||||
if (bundle.isReadOnly()) {
|
||||
View.execInEventDispatchLater(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
ViewMessages.showMessageDialog(getMainFrame().getWindow(), AppStrings.translate("warning.readonly").replace("%file%", sourceInfo.getFileTitleOrName()), AppStrings.translate("message.warning"), JOptionPane.WARNING_MESSAGE, Configuration.warningOpeningReadOnly);
|
||||
}
|
||||
});
|
||||
}
|
||||
result.bundle = bundle;
|
||||
result.name = new File(sourceInfo.getFileTitleOrName()).getName();
|
||||
for (Entry<String, SeekableInputStream> streamEntry : bundle.getAll().entrySet()) {
|
||||
|
||||
Reference in New Issue
Block a user