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

[189828] Kevin's patch for local virtual rename

This commit is contained in:
David McKnight 2007-05-31 16:06:14 +00:00
parent 92a0caff4e
commit 0ed05591ae

View file

@ -11,7 +11,7 @@
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
*
* Contributors:
* {Name} (company) - description of contribution.
* Kevin Doyle (IBM) - [189828] renameTo() now passes proper name to _child.renameTo()
********************************************************************************/
package org.eclipse.rse.internal.services.local.files;
@ -92,6 +92,11 @@ public class LocalVirtualHostFile extends LocalHostFile
* @see org.eclipse.rse.internal.services.local.files.LocalHostFile#renameTo(java.lang.String)
*/
public void renameTo(String newAbsolutePath) {
_child.renameTo(newAbsolutePath);
newAbsolutePath = ArchiveHandlerManager.cleanUpVirtualPath(newAbsolutePath);
String newName = newAbsolutePath;
int i = newAbsolutePath.indexOf(ArchiveHandlerManager.VIRTUAL_SEPARATOR);
if (i != -1)
newName = newAbsolutePath.substring(i + ArchiveHandlerManager.VIRTUAL_SEPARATOR.length());
_child.renameTo(newName);
}
}