From 3a154b3ad9941fe15ae5a9b2666fdca121325d6c Mon Sep 17 00:00:00 2001 From: Martin Oberhuber < martin.oberhuber@windriver.com> Date: Tue, 23 Sep 2008 17:42:47 +0000 Subject: [PATCH] [cleanup][ssh] Use lstat for consistency on all makeHostFile() invocations --- .../rse/internal/services/ssh/files/SftpFileService.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java index 8dee68da736..15767e1899f 100644 --- a/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java +++ b/rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java @@ -889,7 +889,8 @@ public class SftpFileService extends AbstractFileService implements ISshService, String fullPathRecoded = recodeSafeForJsch(concat(remoteParent, fileName)); OutputStream os = getChannel("SftpFileService.createFile").put(fullPathRecoded); //$NON-NLS-1$ os.close(); - SftpATTRS attrs = getChannel("SftpFileService.createFile.stat").stat(fullPathRecoded); //$NON-NLS-1$ + // use lstat for consistency with other invocations of makeHostFile() + SftpATTRS attrs = getChannel("SftpFileService.createFile.stat").lstat(fullPathRecoded); //$NON-NLS-1$ result = makeHostFile(remoteParent, fileName, attrs); Activator.trace("SftpFileService.createFile ok"); //$NON-NLS-1$ } catch (Exception e) { @@ -912,7 +913,8 @@ public class SftpFileService extends AbstractFileService implements ISshService, try { String fullPathRecoded = recodeSafe(fullPath); getChannel("SftpFileService.createFolder").mkdir(fullPathRecoded); //$NON-NLS-1$ - SftpATTRS attrs = getChannel("SftpFileService.createFolder.stat").stat(quoteForJsch(fullPathRecoded)); //$NON-NLS-1$ + // use lstat for consistency with other invocations of makeHostFile() + SftpATTRS attrs = getChannel("SftpFileService.createFolder.stat").lstat(quoteForJsch(fullPathRecoded)); //$NON-NLS-1$ result = makeHostFile(remoteParent, folderName, attrs); Activator.trace("SftpFileService.createFolder ok"); //$NON-NLS-1$ } catch (Exception e) {