mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-17 22:15:23 +02:00
[189828] Kevin's patch for local virtual rename
This commit is contained in:
parent
92a0caff4e
commit
0ed05591ae
1 changed files with 7 additions and 2 deletions
|
@ -11,7 +11,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* 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;
|
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)
|
* @see org.eclipse.rse.internal.services.local.files.LocalHostFile#renameTo(java.lang.String)
|
||||||
*/
|
*/
|
||||||
public void renameTo(String newAbsolutePath) {
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue