1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-30 11:43:33 +02:00

[221211] Fix markStale() for delete() operation with exceptions

This commit is contained in:
Martin Oberhuber 2008-05-06 23:15:16 +00:00
parent afe72c762e
commit 28c10f1771

View file

@ -36,6 +36,7 @@
* Kevin Doyle (IBM) - [224162] SystemEditableRemoteFile.saveAs does not work because FileServiceSubSytem.upload does invalid check * Kevin Doyle (IBM) - [224162] SystemEditableRemoteFile.saveAs does not work because FileServiceSubSytem.upload does invalid check
* Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading * Martin Oberhuber (Wind River) - [218304] Improve deferred adapter loading
* David Dykstal (IBM) - [221211] fix IFileService API for batch operations * David Dykstal (IBM) - [221211] fix IFileService API for batch operations
* Martin Oberhuber (Wind River) - [221211] Fix markStale() for delete() operation with exceptions
*******************************************************************************/ *******************************************************************************/
package org.eclipse.rse.subsystems.files.core.servicesubsystem; package org.eclipse.rse.subsystems.files.core.servicesubsystem;
@ -858,8 +859,11 @@ public class FileServiceSubSystem extends RemoteFileSubSystem implements IFileSe
IFileService service = getFileService(); IFileService service = getFileService();
String parent = folderOrFile.getParentPath(); String parent = folderOrFile.getParentPath();
String name = folderOrFile.getName(); String name = folderOrFile.getName();
service.delete(parent, name, monitor); try {
folderOrFile.markStale(true); service.delete(parent, name, monitor);
} finally {
folderOrFile.markStale(true);
}
return true; return true;
} }
@ -900,9 +904,12 @@ public class FileServiceSubSystem extends RemoteFileSubSystem implements IFileSe
String srcName = sourceFolderOrFile.getName(); String srcName = sourceFolderOrFile.getName();
String tgtParent = targetFolder.getAbsolutePath(); String tgtParent = targetFolder.getAbsolutePath();
removeCachedRemoteFile(sourceFolderOrFile); removeCachedRemoteFile(sourceFolderOrFile);
service.move(srcParent, srcName, tgtParent, newName, monitor); try {
sourceFolderOrFile.markStale(true); service.move(srcParent, srcName, tgtParent, newName, monitor);
targetFolder.markStale(true); } finally {
sourceFolderOrFile.markStale(true);
targetFolder.markStale(true);
}
return true; return true;
} }