commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Franklin (JIRA)" <j...@apache.org>
Subject [jira] Commented: (VFS-33) [vfs] ftp-access a directory failed
Date Wed, 28 Mar 2007 03:40:32 GMT

    [ 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


Mime
View raw message