diff options
author | Michael Valenta | 2003-10-17 16:23:01 +0000 |
---|---|---|
committer | Michael Valenta | 2003-10-17 16:23:01 +0000 |
commit | 70e2aa9e6a69ef9a7083ce0e514f30f943437ecc (patch) | |
tree | e788db140632f72e9216d548c5d68dd6f9c1eed7 | |
parent | 5e0750f3cb271c2f5a6d3211687899062757f130 (diff) | |
download | eclipse.platform.team-70e2aa9e6a69ef9a7083ce0e514f30f943437ecc.tar.gz eclipse.platform.team-70e2aa9e6a69ef9a7083ce0e514f30f943437ecc.tar.xz eclipse.platform.team-70e2aa9e6a69ef9a7083ce0e514f30f943437ecc.zip |
Handle concurrent deletion during sync info caching
-rw-r--r-- | bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java index 58fc4d91b..4156ee46d 100644 --- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java +++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/EclipseSynchronizer.java @@ -284,7 +284,7 @@ public class EclipseSynchronizer implements IFlushOperation { try { cacheResourceSyncForChildren(parent, false /* cannot modify workspace */); } catch (CVSException e) { - if (isCannotModifySynchronizer(e)) { + if (isCannotModifySynchronizer(e) || isResourceNotFound(e)) { // We will resort to loading the sync info for the requested resource from disk byte[] bytes = getSyncBytesFromDisk(resource); if (!resource.exists() && bytes != null && !ResourceSyncInfo.isDeletion(bytes)) { @@ -452,7 +452,7 @@ public class EclipseSynchronizer implements IFlushOperation { cacheResourceSyncForChildren(folder, false); } } catch (CVSException e) { - if (!isCannotModifySynchronizer(e)) { + if (!isCannotModifySynchronizer(e) && !isResourceNotFound(e)) { throw e; } } finally { @@ -474,6 +474,10 @@ public class EclipseSynchronizer implements IFlushOperation { || e.getStatus().getCode() == CVSStatus.FAILED_TO_CACHE_SYNC_INFO); } + private boolean isResourceNotFound(CVSException e) { + return e.getStatus().getCode() == IResourceStatus.RESOURCE_NOT_FOUND; + } + /** * Begins a batch of operations in order to optimize sync file writing. * The provided scheduling rule indicates the resources |