Lines 32-37
Link Here
|
32 |
import org.eclipse.rse.core.subsystems.IConnectorService; |
32 |
import org.eclipse.rse.core.subsystems.IConnectorService; |
33 |
import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; |
33 |
import org.eclipse.rse.core.subsystems.IServiceSubSystemConfiguration; |
34 |
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType; |
34 |
import org.eclipse.rse.core.subsystems.RemoteChildrenContentsType; |
|
|
35 |
import org.eclipse.rse.internal.subsystems.files.core.ISystemFilePreferencesConstants; |
35 |
import org.eclipse.rse.services.clientserver.PathUtility; |
36 |
import org.eclipse.rse.services.clientserver.PathUtility; |
36 |
import org.eclipse.rse.services.clientserver.SystemEncodingUtil; |
37 |
import org.eclipse.rse.services.clientserver.SystemEncodingUtil; |
37 |
import org.eclipse.rse.services.clientserver.SystemSearchString; |
38 |
import org.eclipse.rse.services.clientserver.SystemSearchString; |
Lines 443-449
Link Here
|
443 |
} |
444 |
} |
444 |
String parentPath = file.getParentPath(); |
445 |
String parentPath = file.getParentPath(); |
445 |
File localFile = new File(localpath); |
446 |
File localFile = new File(localpath); |
446 |
getFileService().download(parentPath, file.getName(), localFile, isBinary(file), file.getEncoding(), monitor); |
447 |
getFileService().download(parentPath, file.getName(), localFile, SystemFileTransferModeRegistry.getFileTransferModeDefaultPreference()==ISystemFilePreferencesConstants.FILETRANSFERMODE_BINARY, file.getEncoding(), monitor); |
447 |
if (monitor.isCanceled()) |
448 |
if (monitor.isCanceled()) |
448 |
{ |
449 |
{ |
449 |
localFile.delete(); |
450 |
localFile.delete(); |
Lines 480-486
Link Here
|
480 |
if (slashIndex > -1) { |
481 |
if (slashIndex > -1) { |
481 |
String remoteParentPath = remotePath.substring(0, slashIndex); |
482 |
String remoteParentPath = remotePath.substring(0, slashIndex); |
482 |
String remoteFileName = remotePath.substring(slashIndex + 1, remotePath.length()); |
483 |
String remoteFileName = remotePath.substring(slashIndex + 1, remotePath.length()); |
483 |
boolean isBinary = isBinary(srcEncoding, rmtEncoding, remotePath); |
484 |
boolean isBinary = SystemFileTransferModeRegistry.getFileTransferModeDefaultPreference()==ISystemFilePreferencesConstants.FILETRANSFERMODE_BINARY; |
484 |
if (ArchiveHandlerManager.isVirtual(remotePath)) |
485 |
if (ArchiveHandlerManager.isVirtual(remotePath)) |
485 |
{ |
486 |
{ |
486 |
AbsoluteVirtualPath avp = new AbsoluteVirtualPath(remotePath); |
487 |
AbsoluteVirtualPath avp = new AbsoluteVirtualPath(remotePath); |
Lines 500-506
Link Here
|
500 |
String remoteParentPath = destination.getParentPath(); |
501 |
String remoteParentPath = destination.getParentPath(); |
501 |
String remoteFileName = destination.getName(); |
502 |
String remoteFileName = destination.getName(); |
502 |
String hostEncoding = destination.getEncoding(); |
503 |
String hostEncoding = destination.getEncoding(); |
503 |
boolean isBinary = isBinary(encoding, hostEncoding, destination.getAbsolutePath()); |
504 |
boolean isBinary = SystemFileTransferModeRegistry.getFileTransferModeDefaultPreference()==ISystemFilePreferencesConstants.FILETRANSFERMODE_BINARY; |
504 |
|
505 |
|
505 |
if (!destination.canWrite()) |
506 |
if (!destination.canWrite()) |
506 |
{ |
507 |
{ |