From 884bae98d9dcd777d59d1baef303d6ac2f5f11b5 Mon Sep 17 00:00:00 2001 From: Brianna Date: Thu, 21 Nov 2019 10:47:49 -0500 Subject: [PATCH 1/2] Depricated backup system. --- .../storage/types/StorageYaml.java | 33 ------------------- 1 file changed, 33 deletions(-) diff --git a/src/main/java/com/songoda/epicfurnaces/storage/types/StorageYaml.java b/src/main/java/com/songoda/epicfurnaces/storage/types/StorageYaml.java index 4d2b82d..86d8e3b 100644 --- a/src/main/java/com/songoda/epicfurnaces/storage/types/StorageYaml.java +++ b/src/main/java/com/songoda/epicfurnaces/storage/types/StorageYaml.java @@ -105,23 +105,6 @@ public class StorageYaml extends Storage { @Override public void makeBackup() { - File data = new File(plugin.getDataFolder(), "data.yml"); - File dataClone = new File(plugin.getDataFolder(), "data-backup-" + System.currentTimeMillis() + ".yml"); - try { - if (data.exists()) - copyFile(data, dataClone); - } catch (IOException e) { - e.printStackTrace(); - } - Deque backups = new ArrayDeque<>(); - for (File file : Objects.requireNonNull(plugin.getDataFolder().listFiles())) { - if (file.getName().toLowerCase().contains("data-backup")) { - backups.add(file); - } - } - if (backups.size() > 3) { - backups.getFirst().delete(); - } } @Override @@ -129,20 +112,4 @@ public class StorageYaml extends Storage { dataFile.save(); } - private static void copyFile(File source, File dest) throws IOException { - InputStream is = null; - OutputStream os = null; - try { - is = new FileInputStream(source); - os = new FileOutputStream(dest); - byte[] buffer = new byte[1024]; - int length; - while ((length = is.read(buffer)) > 0) { - os.write(buffer, 0, length); - } - } finally { - is.close(); - os.close(); - } - } } From fa2c4b52e37af7d34016b4cb79b34c862e229e0b Mon Sep 17 00:00:00 2001 From: Brianna Date: Thu, 21 Nov 2019 10:48:17 -0500 Subject: [PATCH 2/2] version 4.5.4 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 40201ef..34d3387 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,7 @@ stages: variables: name: "EpicFurnaces" path: "/builds/$CI_PROJECT_PATH" - version: "4.5.3" + version: "4.5.4" build: stage: build