Giter VIP home page Giter VIP logo

Comments (10)

tgxn avatar tgxn commented on June 16, 2024

Thanks for the report.

Can you provide your config file, thanks. :)

from backup.

tgxn avatar tgxn commented on June 16, 2024

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/

from backup.

iarspider avatar iarspider commented on June 16, 2024

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)

from backup.

lycano avatar lycano commented on June 16, 2024
        // 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 =)

from backup.

iarspider avatar iarspider commented on June 16, 2024

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?

from backup.

lycano avatar lycano commented on June 16, 2024

@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 ^^

from backup.

iarspider avatar iarspider commented on June 16, 2024

1.8.3-dev (as fetched by CraftBukkitUpToDate)

from backup.

lycano avatar lycano commented on June 16, 2024

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.

from backup.

tgxn avatar tgxn commented on June 16, 2024

Cheers lycano! Ill try to push a fix tonight.

from backup.

tgxn avatar tgxn commented on June 16, 2024

Fixed.

from backup.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.