1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 257517 - [project model] Incorrect handling of project delete delta

This commit is contained in:
Anton Leherbauer 2008-12-11 14:35:41 +00:00
parent f3558acfe4
commit 2b7f9a4f65
2 changed files with 9 additions and 4 deletions

View file

@ -478,8 +478,12 @@ public class CProjectDescriptionManager implements ICProjectDescriptionManager {
if (newContents != null) {
ByteArrayOutputStream oldOut = write(oldEl);
InputStream oldContents = new ByteArrayInputStream(oldOut.toByteArray());
try {
if(streamsMatch(newContents, oldContents))
return null;
} finally {
newContents.close();
}
}
}
} catch (CoreException e){

View file

@ -340,7 +340,7 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
if(!shouldVisit((IProject)projDelta.getResource()))
continue;
if((projDelta.getFlags() & IResourceDelta.REMOVED) == IResourceDelta.REMOVED)
if((projDelta.getKind() & IResourceDelta.REMOVED) == IResourceDelta.REMOVED)
continue;
IResourceDelta children[] = projDelta.getAffectedChildren();
@ -354,9 +354,10 @@ public class ResourceChangeHandler extends ResourceChangeHandlerBase implements
continue;
//the .cproject file is changed
if((child.getFlags() & IResourceDelta.REMOVED) == IResourceDelta.REMOVED){
if((child.getKind() & IResourceDelta.REMOVED) == IResourceDelta.REMOVED){
//project file does not exist or corrupted, remove
((RcMoveHandler)handler).setProjectDescription(rc.getProject(), null);
continue;
}
try {