1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-07 00:05:53 +02:00

[189041] updated patch from Xuan - should not remove checking for '\\'

This commit is contained in:
David McKnight 2007-05-28 15:54:49 +00:00
parent b4a7da5d46
commit 48a2bafcef

View file

@ -12,6 +12,7 @@
*
* Contributors:
* {Name} (company) - description of contribution.
* Xuan Chen (IBM) - [189041] incorrect file name after rename a file inside a zip file - DStore Windows
********************************************************************************/
package org.eclipse.rse.internal.services.dstore.files;
@ -339,12 +340,20 @@ public class DStoreHostFile implements IHostFile
public void renameTo(String newAbsolutePath)
{
String current = getName();
newAbsolutePath = ArchiveHandlerManager.cleanUpVirtualPath(newAbsolutePath);
int lastSep = newAbsolutePath.lastIndexOf('/');
if (lastSep == -1)
lastSep = newAbsolutePath.lastIndexOf('\\');
String newName = newAbsolutePath.substring(lastSep + 1);
String newName = null;
if (lastSep != -1)
{
newName = newAbsolutePath.substring(lastSep + 1);
}
else
{
newName = newAbsolutePath;
}
if (newName.equals(current))
{