Bug 127320 [Wizards] NPE importing from zip file
Build id: I20060208-0848 I got this NPE in my log when trying to import an existing project from a zip file: at org.eclipse.core.internal.resources.Workspace.loadProjectDescription(Workspace.java:1399) at org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage$ProjectRecord.setProjectName(WizardProjectsImportPage.java:145) at org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage$ProjectRecord.<init>(WizardProjectsImportPage.java:132) at org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage.collectProjectFilesFromProvider(WizardProjectsImportPage.java:919)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarLeveledStructureProvider.java
}
	/*
	 * Strip the leading directories from the path
	 */
	private String stripPath(String path) {
		String pathOrig = new String(path);
		for (int i = 0; i < stripLevel; i++) {
			int firstSep = path.indexOf('/');
			
			
			if (firstSep == 0) {
				path = path.substring(1);
				firstSep = path.indexOf('/');
			}
			
			
			if (firstSep == -1)
				return pathOrig;
			path = path.substring(firstSep);
		}
		return path;
	}
	public void setStrip(int level) {
		stripLevel = level;
	}
	public int getStrip() {
		return stripLevel;
	}
}