mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-02 22:55:26 +02:00
[187548] Xuan's patch for fix - editor name will be update correctly
This commit is contained in:
parent
e86d27deb3
commit
ba840e978b
2 changed files with 9 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
* Martin Oberhuber (Wind River) - [186640] Add IRSESystemType.testProperty()
|
||||
* Martin Oberhuber (Wind River) - [186773] split ISystemRegistryUI from ISystemRegistry
|
||||
* Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
|
||||
* Xuan Chen (IBM) - [187548] Editor shows incorrect file name after renaming file on Linux dstore
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.files.ui.resources;
|
||||
|
@ -58,6 +59,7 @@ import org.eclipse.rse.core.model.SystemWorkspaceResourceSet;
|
|||
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||
import org.eclipse.rse.internal.files.ui.Activator;
|
||||
import org.eclipse.rse.internal.files.ui.FileResources;
|
||||
import org.eclipse.rse.internal.files.ui.resources.SystemFileNameHelper;
|
||||
import org.eclipse.rse.internal.files.ui.resources.SystemRemoteEditManager;
|
||||
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants;
|
||||
import org.eclipse.rse.services.clientserver.SystemEncodingUtil;
|
||||
|
@ -1781,10 +1783,14 @@ public class UniversalFileTransferUtility
|
|||
path = path.append(separator + actualHost + separator);
|
||||
|
||||
String absolutePath = srcFileOrFolder.getAbsolutePath();
|
||||
|
||||
if (srcFileOrFolder.getSystemConnection().getSystemType().isLocal())
|
||||
{
|
||||
absolutePath = editMgr.getWorkspacePathFor(actualHost, srcFileOrFolder.getAbsolutePath());
|
||||
}
|
||||
|
||||
IPath remote = new Path(absolutePath);
|
||||
absolutePath = SystemFileNameHelper.getEscapedPath(remote.toOSString());
|
||||
|
||||
int colonIndex = absolutePath.indexOf(IPath.DEVICE_SEPARATOR);
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Xuan Chen (IBM) - [189041] incorrect file name after rename a file inside a zip file - DStore Windows
|
||||
* Xuan Chen (IBM) - [187548] Editor shows incorrect file name after renaming file on Linux dstore
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.dstore.files;
|
||||
|
@ -340,6 +341,7 @@ public class DStoreHostFile implements IHostFile
|
|||
public void renameTo(String newAbsolutePath)
|
||||
{
|
||||
String current = getName();
|
||||
String backupNewAbsolutePath = newAbsolutePath;
|
||||
newAbsolutePath = ArchiveHandlerManager.cleanUpVirtualPath(newAbsolutePath);
|
||||
int lastSep = newAbsolutePath.lastIndexOf('/');
|
||||
if (lastSep == -1)
|
||||
|
@ -365,6 +367,7 @@ public class DStoreHostFile implements IHostFile
|
|||
|
||||
_element.setAttribute(DE.A_NAME, newName);
|
||||
}
|
||||
_absolutePath = backupNewAbsolutePath;
|
||||
|
||||
_isArchive = internalIsArchive();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue