Changeset 2027

Show
Ignore:
Timestamp:
02/14/2010 12:01:44 PM (5 months ago)
Author:
djb61
Message:

Make the change to getInodeByPath() introduced in [2021] less broad, specifically only resolve out symlinks where the link is not the last component of the path. This retains the behaviour to make CWD work to subdirectories of symlinks but should prevent breakage in other parts of the system.

Whilst I'm here remove an unrelated redundant import.
See: #269

Location:
trunk/src
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/master/src/org/drftpd/vfs/VirtualFileSystem.java

    r2021 r2027  
    190190                        if (inode.isDirectory()) { 
    191191                                walker = (VirtualFileSystemDirectory) inode; 
    192                         } else if (inode.isLink()) { 
     192                        } else if (inode.isLink() && (x != values.length - 1)) { 
    193193                                walker = (VirtualFileSystemDirectory) getInodeByPath(((VirtualFileSystemLink)inode).getLinkPath()); 
    194194                        } else { // We better be at the end of the array 
  • trunk/src/plugins/org.drftpd.commands.nuke/src/org/drftpd/commands/nuke/Nuke.java

    r2013 r2027  
    3131import org.drftpd.master.BaseFtpConnection; 
    3232import org.drftpd.sections.SectionInterface; 
    33 import org.drftpd.util.ReplacerUtils; 
    3433import org.drftpd.commandmanager.CommandInterface; 
    3534import org.drftpd.commandmanager.CommandRequest;