Closed iarspider closed 13 years ago
Thanks for the report.
Can you provide your config file, thanks. :)
I Have added a catch exception to this class, should fix the issue.
I could not reproduce it, but give the latest build a go: http://ci.tgxn.net/job/dev-Backup/18/
Config file: http://pastebin.com/410bVi5M The error is still there
11:21:38 [INFO] java.lang.NullPointerException
11:21:38 [INFO] at net.tgxn.bukkit.backup.threading.BackupTask.cleanFolder(BackupTask.java:416)
11:21:38 [INFO] at net.tgxn.bukkit.backup.threading.BackupTask.deleteOldBackups(BackupTask.java:381)
11:21:38 [INFO] at net.tgxn.bukkit.backup.threading.BackupTask.backup(BackupTask.java:308)
11:21:38 [INFO] at net.tgxn.bukkit.backup.threading.BackupTask.run(BackupTask.java:83)
11:21:38 [INFO] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
11:21:38 [INFO] java.lang.NullPointerException
11:21:38 [INFO] at net.tgxn.bukkit.backup.threading.BackupTask.cleanFolder(BackupTask.java:416)
11:21:38 [INFO] at net.tgxn.bukkit.backup.threading.BackupTask.deleteOldBackups(BackupTask.java:381)
11:21:38 [INFO] at net.tgxn.bukkit.backup.threading.BackupTask.backup(BackupTask.java:308)
11:21:38 [INFO] at net.tgxn.bukkit.backup.threading.BackupTask.run(BackupTask.java:83)
11:21:38 [INFO] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
11:21:38 [INFO] at java.lang.Thread.run(Unknown Source)
// Store all backup files in an array.
File[] filesList = backupDir.listFiles();
// If the amount of files exceeds the max backups to keep.
if (filesList.length > maxBackups) {
This is from L416 in BackupTask.java
"Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs."
Throws: SecurityException - If a security manager exists and its SecurityManager.checkRead(java.lang.String) method denies read access to the directory
To fix this we have to throw a custom Exception after checking fileList against null.
if (fileList == null) throw new BackupInvalidDirectory("Directory not found or I/O Error occured)
something like that =)
I have checked the folder, and backups are indeed performed fine (and temporary folder is removed correctly). Only the backup cleanup is not performed correctly. I have "Full control" over the backup folder. So, probably the path to backup dir is different in creation and removal code?
@iarspider (according to your config file you do use v1.8. [..]) Edit: okay i was wrong about auto version update sry ;) Have to open an issue about this and implement an update manager ^^
1.8.3-dev (as fetched by CraftBukkitUpToDate)
Thanks, we have to check that ... also i dont get the throws Exception declaration in the methods signature and in body of cleanFolder() ... anysways should be fixed soon.
Cheers lycano! Ill try to push a fix tonight.
Fixed.
Backup 1.8.3-dev on Bukkit 1337: