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

[194204] Renaming Files/Folders moves them sometimes

This commit is contained in:
Javier Montalvo Orus 2007-07-02 08:32:55 +00:00
parent 2c4df36f2c
commit 9195a2578a

View file

@ -43,6 +43,7 @@
* Javier Montalvo Orus (Symbian) - [187096] Drag&Drop + Copy&Paste shows error message on FTP connection
* Javier Montalvo Orus (Symbian) - [187531] Improve exception thrown when Login Failed on FTP
* Javier Montalvo Orus (Symbian) - [187862] Incorrect Error Message when creating new file in read-only directory
* Javier Montalvo Orus (Symbian) - [194204] Renaming Files/Folders moves them sometimes
********************************************************************************/
package org.eclipse.rse.internal.services.files.ftp;
@ -812,6 +813,12 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
try {
FTPClient ftpClient = getFTPClient();
if(!ftpClient.changeWorkingDirectory(remoteParent))
{
throw new RemoteFileIOException(new Exception(ftpClient.getReplyString()));
}
String source = remoteParent.endsWith(String.valueOf(getSeparator())) ? remoteParent + oldName : remoteParent + getSeparator() + oldName;
success = ftpClient.rename(source, newName);