1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-02 22:55:26 +02:00

[276535] File Conflict when Importing Remote Folder with Case-Differentiated-Only Filenames into Project

This commit is contained in:
David McKnight 2009-05-19 15:36:38 +00:00
parent f57d7874db
commit 8fb665e22a
2 changed files with 21 additions and 1 deletions

View file

@ -12,6 +12,7 @@
* David McKnight (IBM) - [223204] [cleanup] fix broken nls strings in files.ui and others
* David McKnight (IBM) - [229610] [api] File transfers should use workspace text file encoding
* David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
* David McKnight (IBM) - [276535] File Conflict when Importing Remote Folder with Case-Differentiated-Only Filenames into Project
*******************************************************************************/
package org.eclipse.rse.internal.importexport.files;
@ -472,6 +473,18 @@ public class RemoteFileImportOperation extends WorkspaceModifyOperation {
{
encoding = "Cp" + encoding.substring(2); //$NON-NLS-1$
}
// check for existing resource
try {
org.eclipse.core.internal.resources.File targetFile = (org.eclipse.core.internal.resources.File)targetResource;
targetFile.checkDoesNotExist(targetFile.getFlags(targetFile.getResourceInfo(false, false)), false);
}
catch (CoreException e){
errorTable.add(e.getStatus());
return;
}
rfss.download(((UniFilePlus) fileObject).remoteFile, targetResource.getLocation().makeAbsolute().toOSString(), encoding, null);
try {
// refresh workspace with just added resource

View file

@ -16,6 +16,7 @@
* David McKnight (IBM) - [219792][importexport][ftp] RSE hangs on FTP import
* Takuya Miyamoto - [185925] Integrate Platform/Team Synchronization
* David McKnight (IBM) - [272708] [import/export] fix various bugs with the synchronization support
* David McKnight (IBM) - [276535] File Conflict when Importing Remote Folder with Case-Differentiated-Only Filenames into Project
*******************************************************************************/
package org.eclipse.rse.internal.importexport.files;
@ -38,6 +39,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
@ -600,7 +602,12 @@ class RemoteImportWizardPage1 extends WizardResourceImportPage implements Listen
}
IStatus status = op.getStatus();
if (!status.isOK()) {
String msgTxt = NLS.bind(RemoteImportExportResources.FILEMSG_IMPORT_FAILED, status);
if (status.isMultiStatus()){
if (((MultiStatus)status).getChildren().length > 0){
status = ((MultiStatus)status).getChildren()[0];
}
}
String msgTxt = NLS.bind(RemoteImportExportResources.MSG_IMPORT_EXPORT_UNEXPECTED_EXCEPTION, status.getMessage());
SystemMessage msg = null;
if (status.getException() != null){