From 7b0ae91357c62d1aa39904adc98c3cec7c09e40d Mon Sep 17 00:00:00 2001 From: Markus Schorn Date: Wed, 10 May 2006 11:26:32 +0000 Subject: [PATCH] Fixed endless loop, bug 100300. --- .../ui/wizards/filewizard/AbstractFileCreationWizardPage.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java index 0de31f9a87c..da4819b202d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/wizards/filewizard/AbstractFileCreationWizardPage.java @@ -337,7 +337,6 @@ public abstract class AbstractFileCreationWizardPage extends NewElementWizardPag IPath oldFolderPath = getSourceFolderFullPath(); IPath newFolderPath = chooseSourceFolder(oldFolderPath); if (newFolderPath != null) { - IPath filePath = getFileFullPath(); setSourceFolderFullPath(newFolderPath, false); handleFieldChanged(ALL_FIELDS); } @@ -527,7 +526,7 @@ public abstract class AbstractFileCreationWizardPage extends NewElementWizardPag private ICElement getSourceFolderFromPath(IPath path) { if (path == null) return null; - while (!path.isEmpty()) { + while (path.segmentCount() > 0) { IResource res = fWorkspaceRoot.findMember(path); if (res != null && res.exists()) { int resType = res.getType();