mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-06 07:45:50 +02:00
[187096] Drag&Drop + Copy&Paste shows error message on FTP connection
This commit is contained in:
parent
938c4adb7f
commit
6b0da7d092
1 changed files with 60 additions and 42 deletions
|
@ -40,6 +40,7 @@
|
|||
* Javier Montalvo Orus (Symbian) - Fixing 176216 - [api] FTP sould provide API to allow clients register their own FTPListingParser
|
||||
* Martin Oberhuber (Wind River) - [186128] Move IProgressMonitor last in all API
|
||||
* Javier Montalvo Orus (Symbian) - improved autodetection of FTPListingParser
|
||||
* Javier Montalvo Orus (Symbian) - [187096] Drag&Drop + Copy&Paste shows error message on FTP connection
|
||||
********************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.services.files.ftp;
|
||||
|
@ -658,10 +659,10 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
|
||||
IHostFile remoteHostFile = getFile(remoteParent,remoteFile,null);
|
||||
|
||||
FTPClient ftpClient = getFTPClient();
|
||||
|
||||
if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
|
||||
{
|
||||
FTPClient ftpClient = getFTPClient();
|
||||
|
||||
MyProgressMonitor progressMonitor = new MyProgressMonitor(monitor);
|
||||
//IHostFile remoteHostFile = null;
|
||||
OutputStream output = null;
|
||||
|
@ -825,6 +826,9 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
|
||||
boolean success = false;
|
||||
|
||||
if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
|
||||
{
|
||||
|
||||
FTPClient ftpClient = getFTPClient();
|
||||
|
||||
try {
|
||||
|
@ -840,6 +844,9 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
|
||||
} catch (Exception e) {
|
||||
throw new RemoteFileIOException(e);
|
||||
}finally {
|
||||
_commandMutex.release();
|
||||
}
|
||||
}
|
||||
|
||||
return success;
|
||||
|
@ -863,6 +870,9 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
|
||||
boolean success = false;
|
||||
|
||||
if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
|
||||
{
|
||||
|
||||
FTPClient ftpClient = getFTPClient();
|
||||
|
||||
try{
|
||||
|
@ -879,8 +889,11 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
|
||||
}catch (Exception e) {
|
||||
throw new RemoteFileIOException(e);
|
||||
}finally {
|
||||
_commandMutex.release();
|
||||
}
|
||||
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
|
@ -889,7 +902,8 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
*/
|
||||
public IHostFile createFolder(String remoteParent, String folderName, IProgressMonitor monitor) throws SystemMessageException
|
||||
{
|
||||
|
||||
if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
|
||||
{
|
||||
FTPClient ftpClient = getFTPClient();
|
||||
|
||||
try
|
||||
|
@ -907,6 +921,10 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
|
|||
}
|
||||
catch (Exception e) {
|
||||
throw new RemoteFileIOException(e);
|
||||
}finally {
|
||||
_commandMutex.release();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return getFile(remoteParent, folderName, monitor);
|
||||
|
|
Loading…
Add table
Reference in a new issue