1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 14:42:11 +02:00

Bug #188285 : deletes src-code when cancelled.

This commit is contained in:
Oleg Krasilnikov 2007-05-22 11:49:20 +00:00
parent 2761e390a0
commit bded31e7fb
2 changed files with 9 additions and 4 deletions

View file

@ -117,8 +117,10 @@ implements IExecutableExtension, IWizardWithMemory
if (newProject == null) {
existingPath = false;
IPath p = fMainPage.getProjectLocation();
if (p == null) p = ResourcesPlugin.getWorkspace().getRoot().getLocation();
p = p.append(fMainPage.getProjectName());
if (p == null) {
p = ResourcesPlugin.getWorkspace().getRoot().getLocation();
p = p.append(fMainPage.getProjectName());
}
File f = p.toFile();
if (f.exists() && f.isDirectory()) {
if (p.append(".project").toFile().exists()) { //$NON-NLS-1$

View file

@ -344,8 +344,11 @@ import org.eclipse.cdt.internal.ui.CPluginImages;
if (bad) { // skip this check if project already created
IPath p = getProjectLocation();
if (p == null) p = ResourcesPlugin.getWorkspace().getRoot().getLocation();
File f = p.append(getProjectName()).toFile();
if (p == null) {
p = ResourcesPlugin.getWorkspace().getRoot().getLocation();
p = p.append(getProjectName());
}
File f = p.toFile();
if (f.exists()) {
if (f.isDirectory()) {
setErrorMessage(UIMessages.getString("CMainWizardPage.7")); //$NON-NLS-1$