1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-04 15:45:25 +02:00

[192610] EFS operations on an FTP connection make Eclipse freeze

This commit is contained in:
Javier Montalvo Orus 2007-07-31 17:08:40 +00:00
parent fbc6113739
commit 0689688bfa

View file

@ -51,6 +51,7 @@
* Javier Montalvo Orus (Symbian) - [197105] Directory listing fails on Solaris when special devices are in a directory
* Javier Montalvo Orus (Symbian) - [197758] Unix symbolic links are not classified as file vs. folder
* Javier Montalvo Orus (Symbian) - [198182] FTP export problem: RSEF8057E: Error occurred while exporting FILENAME: Operation failed. File system input or output error
* Javier Montalvo Orus (Symbian) - [192610] EFS operations on an FTP connection make Eclipse freeze
********************************************************************************/
package org.eclipse.rse.internal.services.files.ftp;
@ -1201,20 +1202,28 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
}
}
FTPClient ftpClient = getFTPClient();
InputStream stream = null;
try {
setFileType(isBinary);
stream = new FTPBufferedInputStream(ftpClient.retrieveFileStream(remoteFile), ftpClient);
}
catch (Exception e) {
throw new RemoteFileIOException(e);
if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
{
FTPClient ftpClient = getFTPClient();
try {
ftpClient.changeWorkingDirectory(remoteParent);
setFileType(isBinary);
stream = new FTPBufferedInputStream(ftpClient.retrieveFileStream(remoteFile), ftpClient);
}
catch (Exception e) {
throw new RemoteFileIOException(e);
}finally {
_commandMutex.release();
}
}
return stream;
}
@ -1232,20 +1241,24 @@ public class FTPService extends AbstractFileService implements IFileService, IFT
}
}
FTPClient ftpClient = getFTPClient();
OutputStream stream = null;
try {
if(_commandMutex.waitForLock(monitor, Long.MAX_VALUE))
{
FTPClient ftpClient = getFTPClient();
ftpClient.changeWorkingDirectory(remoteParent);
setFileType(isBinary);
stream = new FTPBufferedOutputStream(ftpClient.storeFileStream(remoteFile), ftpClient);
}
catch (Exception e) {
throw new RemoteFileIOException(e);
try {
ftpClient.changeWorkingDirectory(remoteParent);
setFileType(isBinary);
stream = new FTPBufferedOutputStream(ftpClient.storeFileStream(remoteFile), ftpClient);
}
catch (Exception e) {
throw new RemoteFileIOException(e);
}finally {
_commandMutex.release();
}
}
return stream;