1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 15:45:25 +02:00

Allow to work with older Jsch

This commit is contained in:
Martin Oberhuber 2008-01-23 21:21:04 +00:00
parent 83578a63fa
commit fde69f9c35

View file

@ -528,9 +528,9 @@ public class SftpFileService extends AbstractFileService implements IFileService
try {
linkTarget=decode(getChannel("makeHostFile.readlink").readlink(recode(concat(parentPath, fileName)))); //$NON-NLS-1$
readlinkDone = true;
} catch(Exception e) {
} catch(Throwable t) {
//readlink() is only supported on sftpv3 and later servers, and jsch-0.1.29 or higher.
//By catching the exception we remain backward compatible.
//By catching the exception (UnsatisfiedLinkError) we remain backward compatible.
//Disadvantages of the cd/pwd approach:
// * _realpath() followed by _stat() might be one extra roundtrip compared to the readlink() approach
// * Immediate link target is not available, only the fully resolved link target (might be an advantage too!)