Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -ur src.bak/alexoft/Minebackup/Backups.java src/alexoft/Minebackup/Backups.java
- --- src.bak/alexoft/Minebackup/Backups.java 2011-09-03 12:37:25.482934662 +0200
- +++ src/alexoft/Minebackup/Backups.java 2011-09-03 13:02:42.354331181 +0200
- @@ -97,6 +97,10 @@
- alexoft.Minebackup.DirUtils.copyDirectory(new File(world.getName()),
- new File(tempDir.getPath() + "/" + world.getName()));
- } catch (Exception ex) {
- + this.plugin.log(Level.SEVERE, "Exception thrown durring backup. You'r world is NOT BACKED UP! Exception was:");
- + this.plugin.log(Level.SEVERE, ex.toString());
- + SendMessage("&4Exception thrown durring backup.");
- + SendMessage("&You'r world is NOT BACKED UP! See console");
- alexoft.Minebackup.DirUtils.deleteDirectory(tempDir);
- throw new IOException();
- }
- diff -ur src.bak/alexoft/Minebackup/DirUtils.java src/alexoft/Minebackup/DirUtils.java
- --- src.bak/alexoft/Minebackup/DirUtils.java 2011-09-02 09:34:36.000000000 +0200
- +++ src/alexoft/Minebackup/DirUtils.java 2011-09-03 13:02:53.057156939 +0200
- @@ -62,7 +62,13 @@
- new File(targetLocation, children[i]));
- }
- } else {
- - InputStream in = new FileInputStream(sourceLocation);
- + InputStream in;
- + try {
- + in = new FileInputStream(sourceLocation);
- + } catch (java.io.FileNotFoundException e) {
- + System.out.println(String.format("MineBackup: Failed to open file %s for reading. Your backup may be incomplete!", sourceLocation));
- + return;
- + }
- OutputStream out = new FileOutputStream(targetLocation);
- // Copy the bits from instream to outstream
Add Comment
Please, Sign In to add comment