Disable synchronous behavior to prevent odd behavior when the backup button is spam clicked
All checks were successful
KnarCraft/Minecraft-Server-Launcher/pipeline/head This commit looks good

This commit is contained in:
Kristian Knarvik 2021-09-27 23:23:06 +02:00
parent 65ede11ab5
commit b2ee22eb7b

View File

@ -43,7 +43,7 @@ public class BackupUtil {
* @param alreadyCopied <p>The amount of bytes already copied</p>
* @throws IOException <p>If we can't start a file stream</p>
*/
private static synchronized long backupFolder(File source, File destination, long backupFileSize,
private static long backupFolder(File source, File destination, long backupFileSize,
long alreadyCopied) throws IOException {
if (backupAborted) {
return 0L;
@ -98,7 +98,7 @@ public class BackupUtil {
*
* @param gui <p>The GUI to use for informing the user</p>
*/
public synchronized static void backup(GUI gui) {
public static void backup(GUI gui) {
backupAborted = false;
if (backupRunning) {
gui.setStatus("A backup is already running");