1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-11 10:15:39 +02:00

[231428] NPE on canceling copy operation from remote host

This commit is contained in:
Radoslav Gerganov 2008-11-27 15:18:42 +00:00
parent e596ee373f
commit 70365fef23
2 changed files with 14 additions and 1 deletions

View file

@ -49,6 +49,7 @@
* Kevin Doyle (IBM) - [227391] Saving file in Eclipse does not update remote file
* David McKnight (IBM) - [234924] [ftp][dnd][Refresh] Copy/Paste file from Package Explorer doesn't refresh folder
* David McKnight (IBM) - [236723] UniversalFileTransferUtility..uploadResourcesFromWorkspace should query remote folder encoding
* Radoslav Gerganov (ProSyst) - [231428] [files] NPE on canceling copy operation from remote host
********************************************************************************/
package org.eclipse.rse.files.ui.resources;
@ -103,6 +104,7 @@ import org.eclipse.rse.services.clientserver.messages.ICommonMessageIds;
import org.eclipse.rse.services.clientserver.messages.SimpleSystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessage;
import org.eclipse.rse.services.clientserver.messages.SystemMessageException;
import org.eclipse.rse.services.clientserver.messages.SystemOperationCancelledException;
import org.eclipse.rse.services.clientserver.messages.SystemUnsupportedOperationException;
import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.services.files.RemoteFileIOException;
@ -295,6 +297,9 @@ public class UniversalFileTransferUtility
}
}
}
catch (SystemOperationCancelledException soce) {
return null;
}
catch (final SystemMessageException e)
{
runInDisplayThread(new Runnable() {
@ -717,6 +722,10 @@ public class UniversalFileTransferUtility
{
IFile tempFile = downloadFileToWorkspace(srcFileOrFolder, monitor);
if (monitor != null && monitor.isCanceled())
{
return resultSet;
}
resultSet.addResource(tempFile);
}
else // folder transfer

View file

@ -25,6 +25,7 @@
* David McKnight (IBM) - [248922] [dnd] Remote to local overwrite copy does not work
* David McKnight (IBM) - [196166] [usability][dnd] Changing the sort order of hosts in the SystemView should work by drag & drop
* David McKnight (IBM) - [248922] [dnd] display error message when copy operation hits exception
* Radoslav Gerganov (ProSyst) - [231428] [files] NPE on canceling copy operation from remote host
*******************************************************************************/
package org.eclipse.rse.internal.ui.view;
@ -206,7 +207,10 @@ public class SystemDNDTransferRunnable extends WorkspaceJob
if (!sameSubSystemType && targetSubSystem != null)
{
ISystemResourceSet tempObjects = srcAdapter.doDrag(set, monitor);
if (monitor.isCanceled()) {
monitor.done();
return false;
}
if (tempObjects == null)
{
// drag failed