Skip to content

Commit

Permalink
Be careful when deleting projects
Browse files Browse the repository at this point in the history
  • Loading branch information
guw committed Oct 19, 2023
1 parent b976ad7 commit 6422a15
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ protected IProject createProjectForElement(String projectName, IPath projectLoca
project.open(monitor.split(1, SUPPRESS_NONE));
} catch (CoreException e) {
LOG.warn("Unable to open existing project '{}'. Deleting and re-creating the project.", project, e);
project.delete(true, monitor.split(1, SUPPRESS_NONE));
project.delete(IResource.NEVER_DELETE_PROJECT_CONTENT, monitor.split(1, SUPPRESS_NONE));
project = null;
}
}
Expand All @@ -642,7 +642,7 @@ protected IProject createProjectForElement(String projectName, IPath projectLoca
LOG.warn(
"Found existing project with name'{}' at different location. Deleting and re-creating the project.",
project);
project.delete(true, monitor.split(1, SUPPRESS_NONE));
project.delete(IResource.NEVER_DELETE_PROJECT_CONTENT, monitor.split(1, SUPPRESS_NONE));
}

// create new project
Expand Down

0 comments on commit 6422a15

Please sign in to comment.