Szum123321 / textile_backup

Backup Mod for Fabric
https://www.curseforge.com/minecraft/mc-mods/textile-backup
GNU General Public License v3.0
90 stars 31 forks source link

Restored backup is being deleted #52

Closed j0r1s closed 3 years ago

j0r1s commented 3 years ago

Scenario :

[11:51:00] [Thread-69/INFO]: [Textile Backup] Backup started because of: Backup Restoration on: 13.12.2020_11-51-00
[11:51:00] [Thread-69/INFO]: Starting backup
[11:51:00] [Thread-69/INFO]: [Textile Backup] Starting backup
[11:51:00] [Thread-69/INFO]: Starting compression...
[11:51:00] [Thread-69/INFO]: Compression took: 00.164 seconds.
[11:51:00] [Thread-69/INFO]: Deleting: 12.12.2020_12-30-08#shutdown.zip
[11:51:00] [Thread-69/INFO]: [Textile Backup] Deleting: 12.12.2020_12-30-08#shutdown.zip
[11:51:00] [Thread-69/INFO]: Done!
[11:51:00] [Thread-69/INFO]: [Textile Backup] Done!
[11:51:00] [Thread-69/INFO]: [Textile Backup] Deleting old world...
[11:51:00] [Thread-69/INFO]: [Textile Backup] Starting decompression...
[11:51:00] [Thread-69/ERROR]: [Textile Backup] An exception occurred!
java.io.FileNotFoundException: /home/minecraft/server/backup/world/12.12.2020_12-30-08#shutdown.zip (No such file or directory)
        at java.io.FileInputStream.open0(Native Method) ~[?:?]
        at java.io.FileInputStream.open(FileInputStream.java:219) ~[?:?]
        at java.io.FileInputStream.<init>(FileInputStream.java:157) ~[?:?]
        at net.szum123321.textile_backup.core.restore.decompressors.ZipDecompressor.decompress(ZipDecompressor.java:36) [textile_backup-2.0.2-1.16.3.jar:?]
        at net.szum123321.textile_backup.core.restore.RestoreBackupRunnable.run(RestoreBackupRunnable.java:72) [textile_backup-2.0.2-1.16.3.jar:?]
        at java.lang.Thread.run(Thread.java:834) [?:?]
[11:51:00] [Thread-69/INFO]: [Textile Backup] Decompression took: 00.002 seconds.
[11:51:00] [Thread-69/INFO]: [Textile Backup] Deleting old backup
[11:51:00] [Thread-69/INFO]: [Textile Backup] Something went wrong while deleting old backup
[11:51:00] [Thread-69/INFO]: [Textile Backup] Done!

Let me know if I can provide any further help.

Szum123321 commented 3 years ago

Are you using the 2.1.0-prev verison?

Szum123321 commented 3 years ago

Right, thank you for reporting this bug. I was comparing file objects instead of their path. Here's a repaired version (zipped because github doesn't allow uploading jars) textile_backup-2.1.0-prev2-1.16.4.jar.zip