fix plugin writer with compiled java plugins

This commit is contained in:
Sculas 2022-03-22 16:49:19 +01:00 committed by GitHub
parent b5664b2949
commit ea48ec9800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -12,6 +12,7 @@ import javax.swing.JMenu;
import javax.swing.JMenuBar;
import javax.swing.JMenuItem;
import javax.swing.JPanel;
import com.google.common.io.Files;
import me.konloch.kontainer.io.DiskReader;
import me.konloch.kontainer.io.DiskWriter;
import org.apache.commons.compress.utils.FileNameUtils;
@ -188,7 +189,7 @@ public class PluginWriter extends JFrame
try
{
//write to temporary file location
DiskWriter.replaceFile(tempFile.getAbsolutePath(), area.getText(), false);
Files.copy(savePath, tempFile);
//run plugin from that location
PluginManager.runPlugin(tempFile);
}