1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-19 23:15:24 +02:00

Delete contents on disk when cleaning up after test

The resource helper is widely used, but when it deletes
projects, it leaves their contents on disk. Fix this
so that the contents on disk is deleted.

Part of #117
This commit is contained in:
Jonah Graham 2022-10-27 10:19:02 -04:00
parent 62179bc863
commit 320bb231c2

View file

@ -728,10 +728,10 @@ public class ResourceHelper {
// Remove IResources created by this helper // Remove IResources created by this helper
for (IResource r : resourcesCreated) { for (IResource r : resourcesCreated) {
if (r.exists()) { if (r.exists()) {
try { if (r instanceof IProject p) {
p.delete(true, true, NULL_MONITOR);
} else {
r.delete(true, NULL_MONITOR); r.delete(true, NULL_MONITOR);
} catch (CoreException e) {
// Ignore
} }
} }
} }