Skip to content
This repository has been archived by the owner on Mar 8, 2022. It is now read-only.

Commit

Permalink
invert dump direction
Browse files Browse the repository at this point in the history
  • Loading branch information
Librazy committed Jul 2, 2018
1 parent 62e27eb commit 613d0bd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/cat/nyaa/HamsterEcoHelper/CommandHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,16 @@ public void userRetrieve(CommandSender sender, Arguments args) {

@SubCommand(value = "dump", permission = "heh.admin")
public void databaseDump(CommandSender sender, Arguments args) {
String from = args.next();
RelationalDB todb = plugin.database.database;
RelationalDB fromdb = DatabaseUtils.get(from).connect();
String to = args.next();
RelationalDB todb = DatabaseUtils.get(to).connect();
RelationalDB fromdb = plugin.database.database;
DatabaseUtils.dumpDatabaseAsync(plugin, fromdb, todb, (cls, r) -> {
if (cls != null) {
msg(sender, "internal.info.dump.ing", cls.getName(), from, r);
msg(sender, "internal.info.dump.ing", cls.getName(), to, r);
} else {
fromdb.close();
if(r == 0){
msg(sender, "internal.info.dump.finished", from);
msg(sender, "internal.info.dump.finished", to);
} else {
msg(sender, "internal.error.command_exception");
}
Expand Down

0 comments on commit 613d0bd

Please sign in to comment.