Bug 157646 [Import/Export] "Import Existing Project" from zip locks file - prevents deletion
Build: M20060629-1905 Even though I cancel the Import Existing Project wizard without completing it, the zip file selected becomes (and remains) locked and cannot be deleted until the workbench is closed. Steps: File > Import > Existing Projects Into Workspace Select a zip file that does not contain any projects Cancel the wizard, but leave the workbench running Attempt to delete the zipfile Result: On Windows XP, this will result in system error stating: "Cannot delete <filename>: It is being used by another person or program." This problem will continue until the workbench is closed.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/wizards/datatransfer/WizardProjectsImportPage.java
public String queryOverwrite(String pathString) {
		Path path = new Path(pathString);
		String messageString;
		
		
		if (path.getFileExtension() == null || path.segmentCount() < 2) {
			messageString = NLS.bind(
					IDEWorkbenchMessages.WizardDataTransfer_existsQuestion,
					pathString);
		} else {
			messageString = NLS
					.bind(
							IDEWorkbenchMessages.WizardDataTransfer_overwriteNameAndPathQuestion,
							path.lastSegment(), path.removeLastSegments(1)
									.toOSString());
		}
		final MessageDialog dialog = new MessageDialog(getContainer()
				.getShell(), IDEWorkbenchMessages.Question, null,
				messageString, MessageDialog.QUESTION, new String[] {
						IDialogConstants.YES_LABEL,
						IDialogConstants.YES_TO_ALL_LABEL,
						IDialogConstants.NO_LABEL,
						IDialogConstants.NO_TO_ALL_LABEL,
						IDialogConstants.CANCEL_LABEL }, 0);
		String[] response = new String[] { YES, ALL, NO, NO_ALL, CANCEL };
		
		
		getControl().getDisplay().syncExec(new Runnable() {
			public void run() {
				dialog.open();