1
0
Fork 0
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:
David McKnight 2009-04-16 19:00:49 +00:00
parent 6b3bffc3f7
commit 17d93bf829

View file

@ -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) {