Bug 130638 Cannot create a project with the zip example
20060306 When I try and create a simple project using the zip example plug-in I get a CoreException from the local manager org.eclipse.core.runtime.CoreException: Cannot create file because existing file of wrong type exists: D:\temp\115791.zip. at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:60) at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) at org.eclipse.core.internal.filesystem.local.LocalFile.mkdir(LocalFile.java:253) at org.eclipse.core.internal.localstore.FileSystemResourceManager.write(FileSystemResourceManager.java:868) at org.eclipse.core.internal.localstore.FileSystemResourceManager.internalWrite(FileSystemResourceManager.java:435) at org.eclipse.core.internal.resources.Project.writeDescription(Project.java:1099) at org.eclipse.core.internal.resources.Project.writeDescription(Project.java:1080) at org.eclipse.core.internal.resources.Project.create(Project.java:302) at org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard.createProject(BasicNewProjectResourceWizard.java:269) at org.eclipse.ui.wizards.newresource.BasicNewProjectResourceWizard$1.execute(BasicNewProjectResourceWizard.java:202) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:101) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1736) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:113) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/CopyAction.java
* The <code>CopyAction</code> implementation of this method defined 
     * on <code>IAction</code> copies the selected resources to the 
     * clipboard.
     */
    public void run() {
        List selectedResources = getSelectedResources();
        IResource[] resources = (IResource[]) selectedResources
                .toArray(new IResource[selectedResources.size()]);
        
        final int length = resources.length;
        int actualLength = 0;
        String[] fileNames = new String[length];
        StringBuffer buf = new StringBuffer();
        for (int i = 0; i < length; i++) {
            IPath location = resources[i].getLocation();
            
            if (location != null) {
				fileNames[actualLength++] = location.toOSString();
			}
            if (i > 0) {
				buf.append("\n"); 
			}
            buf.append(resources[i].getName());
        }
        
        if (actualLength < length) {
            String[] tempFileNames = fileNames;
            fileNames = new String[actualLength];
            for (int i = 0; i < actualLength; i++) {
				fileNames[i] = tempFileNames[i];