mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-05 08:05:24 +02:00
Fix 158534 - NPE in upload/download after conflict
This commit is contained in:
parent
3bf8db48fc
commit
c959f95786
2 changed files with 11 additions and 1 deletions
|
@ -27,6 +27,7 @@ import java.util.Vector;
|
|||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.osgi.util.NLS;
|
||||
|
||||
|
@ -323,6 +324,10 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
{
|
||||
//TODO what to do with isBinary?
|
||||
ChannelSftp channel = null;
|
||||
//Fixing bug 158534. TODO remove when bug 162688 is fixed.
|
||||
if (monitor==null) {
|
||||
monitor = new NullProgressMonitor();
|
||||
}
|
||||
try {
|
||||
SftpProgressMonitor sftpMonitor=new MyProgressMonitor(monitor);
|
||||
int mode=ChannelSftp.OVERWRITE;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||
*
|
||||
* Contributors:
|
||||
* {Name} (company) - description of contribution.
|
||||
* Martin Oberhuber (Wind River) - Fix 158534 - NPE in upload/download after conflict
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.subsystems.files.core.servicesubsystem;
|
||||
|
@ -21,6 +21,7 @@ import java.io.File;
|
|||
import java.io.InputStream;
|
||||
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.rse.core.SystemBasePlugin;
|
||||
import org.eclipse.rse.core.model.IHost;
|
||||
import org.eclipse.rse.core.subsystems.IConnectorService;
|
||||
|
@ -443,6 +444,10 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
*/
|
||||
public void download(IRemoteFile file, String localpath, String encoding, IProgressMonitor monitor)
|
||||
{
|
||||
//Fixing bug 158534. TODO remove when bug 162688 is fixed.
|
||||
if (monitor==null) {
|
||||
monitor = new NullProgressMonitor();
|
||||
}
|
||||
String parentPath = file.getParentPath();
|
||||
File localFile = new File(localpath);
|
||||
try
|
||||
|
|
Loading…
Add table
Reference in a new issue