mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-15 13:05:22 +02:00
[192705] exception needs to be thrown when rename fails
This commit is contained in:
parent
3e5f53964b
commit
66e6b8bb92
1 changed files with 8 additions and 1 deletions
|
@ -16,6 +16,7 @@
|
||||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||||
* Kevin Doyle (IBM) - [182221] Throwing Proper Exceptions on create file/folder
|
* Kevin Doyle (IBM) - [182221] Throwing Proper Exceptions on create file/folder
|
||||||
* Xuan Chen (IBM) - Fix 189487 - copy and paste a folder did not work - workbench hang
|
* Xuan Chen (IBM) - Fix 189487 - copy and paste a folder did not work - workbench hang
|
||||||
|
* David McKnight (IBM) - [192705] Exception needs to be thrown when rename fails
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.local.files;
|
package org.eclipse.rse.internal.services.local.files;
|
||||||
|
@ -997,7 +998,13 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
||||||
return renameVirtualFile(fileToRename, newName);
|
return renameVirtualFile(fileToRename, newName);
|
||||||
}
|
}
|
||||||
File newFile = new File(remoteParent, newName);
|
File newFile = new File(remoteParent, newName);
|
||||||
return fileToRename.renameTo(newFile);
|
boolean result = fileToRename.renameTo(newFile);
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
// for 192705, we need to throw an exception when rename fails
|
||||||
|
throw new SystemMessageException(getMessage("RSEF1301").makeSubstitution(newFile)); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException
|
public boolean rename(String remoteParent, String oldName, String newName, IHostFile oldFile, IProgressMonitor monitor) throws SystemMessageException
|
||||||
|
|
Loading…
Add table
Reference in a new issue