Project: Eclipse_Platform_UI
Bug 93030 [Import/Export] Tarfile Inputstream Broken
Reported: 2005-04-27 18:34:39 | Status: verified fixed

There appears to be issues with a InputSource created from a TarFile input stream. Steps to reproduce: 1. Export a project as a tar or tar.gz 2. Go File > Import > Import Existing Project, and select the archived project to be imported. Then click finish. 3. Fails The problem is the .project is not parsed correctly in the archived files. This is handled in org.eclipse.ui.internal.wizards.datatransfer.WizardProjectsImportPage with the call, if (projectArchiveFile != null) { newDescription = IDEWorkbenchPlugin.getPluginWorkspace() .loadProjectDescription( provider.getContents(projectArchiveFile)); which goes to org.eclipse.core.internal.resources.Workspace result = new ProjectDescriptionReader().read(new InputSource(stream)); Here result is returned as null when is should be a ProjectDescription, this is because the SAXParser fails to parse the InputSource created from the InputStream of the TarFile as gotten with TarLeveledStructureProvider.getContents(Object element) Zip and Tar files seem to be dealt with identically which suggests the problem lies somewhere in the handling of the Tar format itself.

Files changed in fix:
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/TarInputStream.java