Guest User

Untitled

a guest
Oct 21st, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.80 KB | None | 0 0
  1. diff -ur src.bak/alexoft/Minebackup/Backups.java src/alexoft/Minebackup/Backups.java
  2. --- src.bak/alexoft/Minebackup/Backups.java 2011-09-03 12:37:25.482934662 +0200
  3. +++ src/alexoft/Minebackup/Backups.java 2011-09-03 13:02:42.354331181 +0200
  4. @@ -97,6 +97,10 @@
  5.              alexoft.Minebackup.DirUtils.copyDirectory(new File(world.getName()),
  6.                      new File(tempDir.getPath() + "/" + world.getName()));
  7.          } catch (Exception ex) {
  8. +            this.plugin.log(Level.SEVERE, "Exception thrown durring backup. You'r world is NOT BACKED UP! Exception was:");
  9. +            this.plugin.log(Level.SEVERE, ex.toString());
  10. +            SendMessage("&4Exception thrown durring backup.");
  11. +            SendMessage("&You'r world is NOT BACKED UP! See console");
  12.              alexoft.Minebackup.DirUtils.deleteDirectory(tempDir);
  13.              throw new IOException();
  14.          }
  15. diff -ur src.bak/alexoft/Minebackup/DirUtils.java src/alexoft/Minebackup/DirUtils.java
  16. --- src.bak/alexoft/Minebackup/DirUtils.java    2011-09-02 09:34:36.000000000 +0200
  17. +++ src/alexoft/Minebackup/DirUtils.java    2011-09-03 13:02:53.057156939 +0200
  18. @@ -62,7 +62,13 @@
  19.                          new File(targetLocation, children[i]));
  20.              }
  21.          } else {
  22. -            InputStream in = new FileInputStream(sourceLocation);
  23. +            InputStream in;
  24. +            try {
  25. +                in = new FileInputStream(sourceLocation);
  26. +            } catch (java.io.FileNotFoundException e) {
  27. +                System.out.println(String.format("MineBackup: Failed to open file %s for reading. Your backup may be incomplete!", sourceLocation));
  28. +                return;
  29. +                }
  30.              OutputStream out = new FileOutputStream(targetLocation);
  31.              
  32.              // Copy the bits from instream to outstream
Add Comment
Please, Sign In to add comment