mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-03 15:15:25 +02:00
Workaround bug 153118 - ssh hangs when trying to create empty file
This commit is contained in:
parent
80981eee1e
commit
a604bc4c50
1 changed files with 3 additions and 0 deletions
|
@ -432,6 +432,9 @@ public class SftpFileService extends AbstractFileService implements IFileService
|
|||
try {
|
||||
String fullPath = remoteParent + '/' + fileName;
|
||||
OutputStream os = getChannel("SftpFileService.createFile").put(fullPath); //$NON-NLS-1$
|
||||
//TODO workaround bug 153118: write a single space
|
||||
//since jsch hangs when trying to close the stream without writing
|
||||
os.write(32);
|
||||
os.close();
|
||||
SftpATTRS attrs = getChannel("SftpFileService.createFile.stat").stat(fullPath); //$NON-NLS-1$
|
||||
result = makeHostFile(remoteParent, fileName, attrs);
|
||||
|
|
Loading…
Add table
Reference in a new issue