Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2006-01-24 21:08:45 +0000
committerMichael Valenta2006-01-24 21:08:45 +0000
commit42eef85680873768cd0875057fcbf42f6f3c2ac2 (patch)
treed02d9d8c9420b2972071aeeaed9ac5fd4ea6d72e
parente94d3998c0224b39c9497c0f8b56801b99b87c03 (diff)
downloadeclipse.platform.team-42eef85680873768cd0875057fcbf42f6f3c2ac2.tar.gz
eclipse.platform.team-42eef85680873768cd0875057fcbf42f6f3c2ac2.tar.xz
eclipse.platform.team-42eef85680873768cd0875057fcbf42f6f3c2ac2.zip
Added appropriate checks to cache base operation
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java
index 6d9245701..8f0fa860d 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/CacheBaseContentsOperation.java
@@ -109,8 +109,9 @@ public class CacheBaseContentsOperation extends CacheTreeContentsOperation {
monitor.beginTask(null, resources.length * 100);
for (int i = 0; i < resources.length; i++) {
IResource resource = resources[i];
- if (resource.getType() == IResource.FILE) {
- if (comparator.compareContents((IFile)resource, (IResourceVariant)CVSWorkspaceRoot.getRemoteResourceFor(resource), Policy.subMonitorFor(monitor, 100))) {
+ if (resource.exists() && resource.getType() == IResource.FILE) {
+ IResourceVariant remoteResource = (IResourceVariant)CVSWorkspaceRoot.getRemoteResourceFor(resource);
+ if (remoteResource != null && comparator.compareContents((IFile)resource, remoteResource, Policy.subMonitorFor(monitor, 100))) {
ICVSFile cvsFile = CVSWorkspaceRoot.getCVSFileFor((IFile)resource);
cvsFile.checkedIn(null, false /* not a commit */);
}

Back to the top