Index: C:/drftpd/eclipse/tmp/src/org/drftpd/commands/Nuke.java =================================================================== --- C:/drftpd/eclipse/tmp/src/org/drftpd/commands/Nuke.java (revision 1214) +++ C:/drftpd/eclipse/tmp/src/org/drftpd/commands/Nuke.java (working copy) @@ -228,32 +228,6 @@ } } - //rename - String toDirPath; - String toName = "[NUKED]-" + nukeDir.getName(); - - try { - toDirPath = nukeDir.getParentFile().getPath(); - } catch (FileNotFoundException ex) { - logger.fatal("", ex); - - return Reply.RESPONSE_553_REQUESTED_ACTION_NOT_TAKEN; - } - - try { - nukeDir.renameTo(toDirPath, toName); - nukeDir.createDirectory(conn.getUserNull().getName(), - conn.getUserNull().getGroup(), "REASON-" + reason); - } catch (IOException ex) { - logger.warn("", ex); - response.addComment(" cannot rename to \"" + toDirPath + "/" + - toName + "\": " + ex.getMessage()); - response.setCode(500); - response.setMessage("NUKE failed"); - - return response; - } - long nukeDirSize = 0; long nukedAmount = 0; @@ -296,6 +270,32 @@ getNukeLog().add(nuke); conn.getGlobalContext().dispatchFtpEvent(nuke); + //rename + String toDirPath; + String toName = "[NUKED]-" + nukeDir.getName(); + + try { + toDirPath = nukeDir.getParentFile().getPath(); + } catch (FileNotFoundException ex) { + logger.fatal("", ex); + + return Reply.RESPONSE_553_REQUESTED_ACTION_NOT_TAKEN; + } + + try { + nukeDir.renameTo(toDirPath, toName); + nukeDir.createDirectory(conn.getUserNull().getName(), + conn.getUserNull().getGroup(), "REASON-" + reason); + } catch (IOException ex) { + logger.warn("", ex); + response.addComment(" cannot rename to \"" + toDirPath + "/" + + toName + "\": " + ex.getMessage()); + response.setCode(500); + response.setMessage("NUKE failed"); + + return response; + } + return response; }