You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Andrew Franklin (JIRA)" <ji...@apache.org> on 2007/03/28 05:40:32 UTC

[jira] Commented: (VFS-33) [vfs] ftp-access a directory failed

    [ 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:mypass@195.60.99.6/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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org