[ 
https://issues.apache.org/jira/browse/VFS-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484694
 ] 

Andrew Franklin commented on VFS-33:
------------------------------------

A partial solution I've found for FtpFileObject is to edit the getInfo method 
to yield:

{noformat}
    /**
     * Fetches the info for this file.
     */
    private void getInfo(boolean flush) throws IOException
    {
        final FtpFileObject parent = (FtpFileObject) 
FileObjectUtils.getAbstractFileObject(getParent());
        FTPFile newFileInfo= null;
        if (parent != null)
        {
            newFileInfo = 
parent.getChildFile(UriParser.decode(getName().getBaseName()), flush);
        }

        if( newFileInfo==null )
        {
            // Assume the root is a directory and exists
            newFileInfo = new FTPFile();
            newFileInfo.setType(FTPFile.DIRECTORY_TYPE);
        }

        this.fileInfo = newFileInfo;
    }
{noformat}

This solution seems to fix some of my ftp setups and avoids a null pointer 
exception in some cases. It still doesn't seem to fix every permutation so I'm 
going to look at it some more.

Does anyone else have any news on this issue?

> [vfs] ftp-access a directory failed
> -----------------------------------
>
>                 Key: VFS-33
>                 URL: https://issues.apache.org/jira/browse/VFS-33
>             Project: Commons VFS
>          Issue Type: Bug
>         Environment: Operating System: All
> Platform: Other
>            Reporter: Sven Homburg
>             Fix For: later
>
>
> i try to connect via ftp to a server with this uri : 
> ftp://johndoe:[EMAIL PROTECTED]/depotxxx/depot120/ 
> the user johndoe has only access to this directory but VFS tries to access 
> the depotxxx and the 
> root dir

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to