mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-02 22:55:26 +02:00
[271244] [sftp files] "My Home" filter not working
-handling the case where /root is the home dir
This commit is contained in:
parent
6b3bffc3f7
commit
17d93bf829
1 changed files with 1 additions and 1 deletions
|
@ -861,7 +861,7 @@ public class SftpFileService extends AbstractFileService implements ISshService,
|
|||
if (fUserHome!=null) {
|
||||
int lastSlash = fUserHome.lastIndexOf('/');
|
||||
String name = fUserHome.substring(lastSlash + 1);
|
||||
String parent = fUserHome.substring(0, lastSlash);
|
||||
String parent = lastSlash > 0 ? fUserHome.substring(0, lastSlash) : lastSlash == 0 ? "/" : ""; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
try {
|
||||
return getFile(parent, name, null);
|
||||
} catch(SystemMessageException e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue