1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-21 15:23:59 +02:00

fix for dstore rename (where name shows as full path)

This commit is contained in:
David McKnight 2006-10-18 16:16:17 +00:00
parent 1ad79089c0
commit deaf8a489b

View file

@ -315,7 +315,13 @@ public class DStoreHostFile implements IHostFile
}
else
{
_element.setAttribute(DE.A_NAME, newAbsolutePath);
int lastSep = newAbsolutePath.lastIndexOf('/');
if (lastSep == -1)
lastSep = newAbsolutePath.lastIndexOf('\\');
String newName = newAbsolutePath.substring(lastSep + 1);
_element.setAttribute(DE.A_NAME, newName);
}
_isArchive = internalIsArchive();