1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 15:15:25 +02:00

avoid NPE on non-VMS servers containing DOS-like paths as root (as WFTPD)

This commit is contained in:
Javier Montalvo Orus 2007-05-10 15:35:01 +00:00
parent cf475049f2
commit a289426950

View file

@ -360,7 +360,7 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
_userHome = _ftpClient.printWorkingDirectory();
//For VMS, normalize the home location
if(_userHome.indexOf(':')!=-1)
if(_userHome.indexOf(':')!=-1 && _userHome.indexOf(']')!=-1)
{
_userHome = _userHome.replaceAll(":\\[", "/"); //$NON-NLS-1$ //$NON-NLS-2$
_userHome = '/'+_userHome.substring(0,_userHome.lastIndexOf(']'));