1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-07 16:26:11 +02:00

[349947] Applied Simon's patch for scp service.

This commit is contained in:
Anna Dushistova 2011-07-07 14:47:38 +00:00
parent a232476b86
commit 4036bce68c

View file

@ -9,6 +9,7 @@
* Nikita Shulga - initial API and implementation * Nikita Shulga - initial API and implementation
* Anna Dushistova (Mentor Graphics) - [331213][scp] Provide UI-less scp IFileService in org.eclipse.rse.services.ssh * Anna Dushistova (Mentor Graphics) - [331213][scp] Provide UI-less scp IFileService in org.eclipse.rse.services.ssh
* Anna Dushistova (Mentor Graphics) - [331249][scp] incorrect home while logging in as root * Anna Dushistova (Mentor Graphics) - [331249][scp] incorrect home while logging in as root
* Simon Bernard (Sierra Wireless) - [349947][scp] with scp IRemoteFile.exist() returns always true
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.internal.services.ssh.files.scp; package org.eclipse.rse.internal.services.ssh.files.scp;
@ -494,9 +495,12 @@ public class ScpFileService extends AbstractFileService implements
private IHostFile makeHostFile(String remotePath, String fileName, private IHostFile makeHostFile(String remotePath, String fileName,
ScpFileAttr attr) { ScpFileAttr attr) {
boolean isRoot = (remotePath == null || remotePath.length() == 0); boolean isRoot = (remotePath == null || remotePath.length() == 0);
if (attr == null) if (attr == null) {
return new SftpHostFile(isRoot ? null : remotePath, fileName, SftpHostFile sftpHostFile = new SftpHostFile(isRoot ? null : remotePath, fileName, false,
false, isRoot, false, 0, 0); isRoot, false, 0, 0);
sftpHostFile.setExists(false);
return sftpHostFile;
}
boolean isLink = attr.isLink(); boolean isLink = attr.isLink();
boolean isDir = attr.isDirectory(); boolean isDir = attr.isDirectory();