Changeset 2036

Show
Ignore:
Timestamp:
02/23/2010 04:30:21 AM (5 months ago)
Author:
scitz0
Message:

Fix for PRE plugin. Slaves go offline if directory in target section already exist.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/plugins/org.drftpd.commands.pre/src/org/drftpd/commands/pre/Pre.java

    r2034 r2036  
    7272 
    7373        if (section.getName().equals("")) { 
    74             return new CommandResponse(200, "Invalid section, see SITE SECTIONS for a list of available sections"); 
     74            return new CommandResponse(500, "Invalid section, see SITE SECTIONS for a list of available sections"); 
    7575        } 
    7676 
     
    103103                 
    104104                DirectoryHandle toInode = new DirectoryHandle(section.getCurrentDirectory().getPath() + VirtualFileSystem.separator + preDir.getName()); 
    105                  
     105 
     106                if (toInode.exists()) { 
     107                        return new CommandResponse(500, "Directory already exist in target section"); 
     108                } 
     109 
    106110                CommandResponse response = new CommandResponse(250, request.getCommand().toUpperCase() + " command successful."); 
    107111