Bug 198272

Summary: [ftp] FTP should return classification for symbolic links so they show a link overlay
Product: [Tools] Target Management Reporter: Martin Oberhuber <mober.at+eclipse>
Component: RSEAssignee: Javier Montalvo Orús <javier.montalvoorus>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: enhancement    
Priority: P3    
Version: 2.0   
Target Milestone: 2.0.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 197758    
Bug Blocks:    

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.