Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 78471 Details for
Bug 203490
[ssh] NPE in SftpFileService.getUserHome()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patch fixing the issue
patch203490_sftpHomeNPE.diff.txt (text/plain), 2.35 KB, created by
Martin Oberhuber
on 2007-09-14 16:39:20 EDT
(
hide
)
Description:
Patch fixing the issue
Filename:
MIME Type:
Creator:
Martin Oberhuber
Created:
2007-09-14 16:39:20 EDT
Size:
2.35 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rse.services.ssh >Index: src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java >=================================================================== >RCS file: /cvsroot/dsdp/org.eclipse.tm.rse/plugins/org.eclipse.rse.services.ssh/src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java,v >retrieving revision 1.21 >diff -u -r1.21 SftpFileService.java >--- src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java 3 Sep 2007 18:24:13 -0000 1.21 >+++ src/org/eclipse/rse/internal/services/ssh/files/SftpFileService.java 14 Sep 2007 20:38:51 -0000 >@@ -13,6 +13,7 @@ > * Martin Oberhuber (Wind River) - [192724] Fixed logic to filter folders if FILE_TYPE_FOLDERS > * Martin Oberhuber (Wind River) - [199548] Avoid touching files on setReadOnly() if unnecessary > * Benjamin Muskalla (b.muskalla@gmx.net) - [174690][ssh] cannot delete symbolic links on remote systems >+ * Martin Oberhuber (Wind River) - [203490] Fix NPE in SftpService.getUserHome() > *******************************************************************************/ > > package org.eclipse.rse.internal.services.ssh.files; >@@ -574,16 +575,19 @@ > > public IHostFile getUserHome() { > //TODO Assert: this is only called after we are connected >- int lastSlash = fUserHome.lastIndexOf('/'); >- String name = fUserHome.substring(lastSlash + 1); >- String parent = fUserHome.substring(0, lastSlash); >- try { >- return getFile(parent, name, null); >- } catch(SystemMessageException e) { >- //Could not determine user home >- //return new SftpHostFile(".",".",true,false,false,0,0); //$NON-NLS-1$ //$NON-NLS-2$ >- return new SftpHostFile("/", "/", true, true, false, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ >+ if (fUserHome!=null) { >+ int lastSlash = fUserHome.lastIndexOf('/'); >+ String name = fUserHome.substring(lastSlash + 1); >+ String parent = fUserHome.substring(0, lastSlash); >+ try { >+ return getFile(parent, name, null); >+ } catch(SystemMessageException e) { >+ //Error getting user home -> return a default below >+ } > } >+ //Could not determine user home >+ //return new SftpHostFile(".",".",true,false,false,0,0); //$NON-NLS-1$ //$NON-NLS-2$ >+ return new SftpHostFile("/", "/", true, true, false, 0, 0); //$NON-NLS-1$ //$NON-NLS-2$ > } > > public IHostFile[] getRoots(IProgressMonitor monitor) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 203490
: 78471 |
79228