You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "James Carman (JIRA)" <ji...@apache.org> on 2008/01/31 17:53:08 UTC
[jira] Created: (VFS-196) FTP Provider Does Not Support Symbolic
Links Correctly
FTP Provider Does Not Support Symbolic Links Correctly
------------------------------------------------------
Key: VFS-196
URL: https://issues.apache.org/jira/browse/VFS-196
Project: Commons VFS
Issue Type: Bug
Affects Versions: 1.1
Reporter: James Carman
Assignee: James Carman
Fix For: 1.1
If a directory is a symbolic link, it shows up as file type "imaginary"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (VFS-196) FTP Provider Does Not Support Symbolic
Links Correctly
Posted by "James Carman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Carman resolved VFS-196.
------------------------------
Resolution: Fixed
Fix Version/s: 2.0
The patch has been applied to both trunk and the version 1 branch. I did not include a unit test for this, as I am unfamiliar with how you do unit testing in VFS. We have however, used this patch in our local version for quite some time and it seems to work just fine.
> FTP Provider Does Not Support Symbolic Links Correctly
> ------------------------------------------------------
>
> Key: VFS-196
> URL: https://issues.apache.org/jira/browse/VFS-196
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.1
> Reporter: James Carman
> Assignee: James Carman
> Fix For: 1.1, 2.0
>
> Attachments: symbolic_links.patch
>
>
> If a directory is a symbolic link, it shows up as file type "imaginary"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VFS-196) FTP Provider Does Not Support Symbolic
Links Correctly
Posted by "Mario Ivankovits (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599580#action_12599580 ]
Mario Ivankovits commented on VFS-196:
--------------------------------------
Go on an commit it please!
Thanks!
> FTP Provider Does Not Support Symbolic Links Correctly
> ------------------------------------------------------
>
> Key: VFS-196
> URL: https://issues.apache.org/jira/browse/VFS-196
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.1
> Reporter: James Carman
> Assignee: James Carman
> Fix For: 1.1
>
> Attachments: symbolic_links.patch
>
>
> If a directory is a symbolic link, it shows up as file type "imaginary"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VFS-196) FTP Provider Does Not Support Symbolic
Links Correctly
Posted by "Mario Ivankovits (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599589#action_12599589 ]
Mario Ivankovits commented on VFS-196:
--------------------------------------
In VFS 2 we need the first version where "nul" will be returned in case of listFiles didn't return something which indicates that this was a
file and not a directory and thus this file had "null" children.
> FTP Provider Does Not Support Symbolic Links Correctly
> ------------------------------------------------------
>
> Key: VFS-196
> URL: https://issues.apache.org/jira/browse/VFS-196
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.1
> Reporter: James Carman
> Assignee: James Carman
> Fix For: 1.1, 2.0
>
> Attachments: symbolic_links.patch
>
>
> If a directory is a symbolic link, it shows up as file type "imaginary"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VFS-196) FTP Provider Does Not Support Symbolic
Links Correctly
Posted by "James Carman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599575#action_12599575 ]
James Carman commented on VFS-196:
----------------------------------
Mario,
Do you want me to just apply this patch or would you like to check it out first?
James
> FTP Provider Does Not Support Symbolic Links Correctly
> ------------------------------------------------------
>
> Key: VFS-196
> URL: https://issues.apache.org/jira/browse/VFS-196
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.1
> Reporter: James Carman
> Assignee: James Carman
> Fix For: 1.1
>
> Attachments: symbolic_links.patch
>
>
> If a directory is a symbolic link, it shows up as file type "imaginary"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (VFS-196) FTP Provider Does Not Support Symbolic
Links Correctly
Posted by "James Carman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-196?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Carman updated VFS-196:
-----------------------------
Attachment: symbolic_links.patch
Here's a patch that fixes the problem. Please review.
> FTP Provider Does Not Support Symbolic Links Correctly
> ------------------------------------------------------
>
> Key: VFS-196
> URL: https://issues.apache.org/jira/browse/VFS-196
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.1
> Reporter: James Carman
> Assignee: James Carman
> Fix For: 1.1
>
> Attachments: symbolic_links.patch
>
>
> If a directory is a symbolic link, it shows up as file type "imaginary"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VFS-196) FTP Provider Does Not Support Symbolic
Links Correctly
Posted by "Mario Ivankovits (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599590#action_12599590 ]
Mario Ivankovits commented on VFS-196:
--------------------------------------
Just in case it is not clear, with "first" version I mean the "null" check. The symbolic check stuff should be fine.
BTW. In case of isSymbolicLink, you can also use this.getLinkDestination().getName() instead of doing the name-resolve yourself.
> FTP Provider Does Not Support Symbolic Links Correctly
> ------------------------------------------------------
>
> Key: VFS-196
> URL: https://issues.apache.org/jira/browse/VFS-196
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.1
> Reporter: James Carman
> Assignee: James Carman
> Fix For: 1.1, 2.0
>
> Attachments: symbolic_links.patch
>
>
> If a directory is a symbolic link, it shows up as file type "imaginary"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (VFS-196) FTP Provider Does Not Support Symbolic
Links Correctly
Posted by "James Carman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/VFS-196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12599587#action_12599587 ]
James Carman commented on VFS-196:
----------------------------------
There were some changes to the logic in trunk from when I created this patch. The trunk had:
\\
\\
{code}
final FTPFile[] tmpChildren = client.listFiles(relPath);
if (tmpChildren == null)
{
children = null;
}
else if (tmpChildren.length == 0)
{
children = EMPTY_FTP_FILE_MAP;
}
else
{
children = new TreeMap();
...
{code}
\\
and my code has:
\\
\\
{code}
final String path = fileInfo != null && fileInfo.isSymbolicLink() ? getFileSystem().getFileSystemManager().resolveName(getParent().getName(), fileInfo.getLink() ).getPath() : relPath;
final FTPFile[] tmpChildren = client.listFiles(path);
if (tmpChildren == null || tmpChildren.length == 0)
{
children = EMPTY_FTP_FILE_MAP;
}
else
{
children = new TreeMap();
...
{code}
\\
I don't know if the null case is handled correctly or not. Please advise.
> FTP Provider Does Not Support Symbolic Links Correctly
> ------------------------------------------------------
>
> Key: VFS-196
> URL: https://issues.apache.org/jira/browse/VFS-196
> Project: Commons VFS
> Issue Type: Bug
> Affects Versions: 1.1
> Reporter: James Carman
> Assignee: James Carman
> Fix For: 1.1, 2.0
>
> Attachments: symbolic_links.patch
>
>
> If a directory is a symbolic link, it shows up as file type "imaginary"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.