mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Bug 142182: Copying archives to local connection file system does not work
This commit is contained in:
parent
de80315a4f
commit
1370bbef90
2 changed files with 7 additions and 2 deletions
|
@ -446,12 +446,11 @@ public class LocalFileService extends AbstractFileService implements IFileServic
|
|||
File target = new File(remoteParent, remoteFile);
|
||||
boolean sourceIsVirtual = ArchiveHandlerManager.isVirtual(localFile.getAbsolutePath());
|
||||
boolean targetIsVirtual = ArchiveHandlerManager.isVirtual(target.getAbsolutePath());
|
||||
boolean targetIsArchive = ArchiveHandlerManager.getInstance().isArchive(target);
|
||||
if (sourceIsVirtual)
|
||||
{
|
||||
return copyFromArchive(localFile, target, remoteFile, monitor, srcEncoding, hostEncoding, !isBinary);
|
||||
}
|
||||
if (targetIsVirtual || targetIsArchive)
|
||||
if (targetIsVirtual)
|
||||
{
|
||||
return copyToArchive(localFile, target, remoteFile, monitor, srcEncoding, hostEncoding, !isBinary);
|
||||
}
|
||||
|
|
|
@ -450,6 +450,12 @@ public final class FileServiceSubSystem extends RemoteFileSubSystem implements I
|
|||
String remoteParentPath = remotePath.substring(0, slashIndex);
|
||||
String remoteFileName = remotePath.substring(slashIndex + 1, remotePath.length());
|
||||
boolean isBinary = isBinary(srcEncoding, rmtEncoding, remotePath);
|
||||
if (ArchiveHandlerManager.isVirtual(remotePath))
|
||||
{
|
||||
AbsoluteVirtualPath avp = new AbsoluteVirtualPath(remotePath);
|
||||
remoteParentPath = avp.getPath();
|
||||
remoteFileName = avp.getName();
|
||||
}
|
||||
try
|
||||
{
|
||||
getFileService().upload(monitor, new File(source), remoteParentPath, remoteFileName, isBinary, srcEncoding, rmtEncoding);
|
||||
|
|
Loading…
Add table
Reference in a new issue