Bug 198272 - [ftp] FTP should return classification for symbolic links so they show a link overlay
Summary: [ftp] FTP should return classification for symbolic links so they show a link...
Status: RESOLVED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.0.1   Edit
Assignee: Javier Montalvo Orús CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
Depends on: 197758
Blocks:
  Show dependency tree
 
Reported: 2007-07-30 10:33 EDT by Martin Oberhuber CLA
Modified: 2007-08-01 11:48 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2007-07-30 10:33:18 EDT
From bug 197105 comment 27, see also bug 197758

On FTP, symbolic links are not reported as symbolic links but rather as files (or directories, once the patch for bug 197758 is applied).

To be more correct, these should be reported with a classification of "symbolic link(file) to /link/target". See the SSH implementation for reference: 
SftpRemoteFile which overrides getClassification(), and
SftpHostFile.getClassification() for reference.

Adding this in 2.0.1 would be possible easily since FTPHostFile is "internal" so it's no API change. Commons Net gives the required information with
FTPFile.isSymbolicLink() and FTPFile.getLink() already.
Comment 1 Javier Montalvo Orús CLA 2007-08-01 06:13:03 EDT
The getClassification() implementation in FTPRemoteFile is too simple, only returning type file or folder.
I'll improve it based on the SftpRemoteFile and SftpHostFile implementations to return symbolic links as well.
Comment 2 Javier Montalvo Orús CLA 2007-08-01 11:48:48 EDT
Improved the getClassification() implementation in FTP.
Now it returns file / folder / symbolic link types and binary in case is marked as an executable.