mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-23 00:03:53 +02:00
[298440] jar files in a directory can't be pasted to another system properly
This commit is contained in:
parent
5cf97ddad1
commit
10d13d2ab1
2 changed files with 29 additions and 14 deletions
|
@ -59,6 +59,7 @@
|
||||||
* David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
|
* David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
|
||||||
* David McKnight (IBM) - [234258] [dnd] Drag&Drop a folder silently ignores elements without permissions
|
* David McKnight (IBM) - [234258] [dnd] Drag&Drop a folder silently ignores elements without permissions
|
||||||
* David McKnight (IBM) - [299140] Local Readonly file can't be copied/pasted twice
|
* David McKnight (IBM) - [299140] Local Readonly file can't be copied/pasted twice
|
||||||
|
* David McKnight (IBM) - [298440] jar files in a directory can't be pasted to another system properly
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.files.ui.resources;
|
package org.eclipse.rse.files.ui.resources;
|
||||||
|
@ -596,16 +597,29 @@ public class UniversalFileTransferUtility {
|
||||||
}
|
}
|
||||||
//get all subfolders
|
//get all subfolders
|
||||||
children=srcFS.list(srcFileOrFolder, IFileService.FILE_TYPE_FOLDERS, monitor);
|
children=srcFS.list(srcFileOrFolder, IFileService.FILE_TYPE_FOLDERS, monitor);
|
||||||
|
|
||||||
if(!(children==null) && !(children.length==0))
|
if(!(children==null) && !(children.length==0))
|
||||||
{
|
{
|
||||||
SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, children);
|
// make sure children are not archives!
|
||||||
//recurse with subfolders to check for empty folders
|
ArrayList fcs = new ArrayList();
|
||||||
SystemWorkspaceResourceSet childResults = downloadResourcesToWorkspaceMultiple(childSet, monitor);
|
for (int c = 0; c < children.length; c++){
|
||||||
if (childResults.hasMessage())
|
IRemoteFile child = children[c];
|
||||||
{
|
if (!child.isArchive()){
|
||||||
resultSet.setMessage(childResults.getMessage());
|
fcs.add(child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (fcs.size() > 0){
|
||||||
|
|
||||||
|
SystemRemoteResourceSet childSet = new SystemRemoteResourceSet(srcFS, fcs);
|
||||||
|
|
||||||
|
//recurse with subfolders to check for empty folders
|
||||||
|
SystemWorkspaceResourceSet childResults = downloadResourcesToWorkspaceMultiple(childSet, monitor);
|
||||||
|
if (childResults.hasMessage())
|
||||||
|
{
|
||||||
|
resultSet.setMessage(childResults.getMessage());
|
||||||
|
}
|
||||||
|
resultSet.addResource(tempFolder);
|
||||||
}
|
}
|
||||||
resultSet.addResource(tempFolder);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (SystemMessageException e)
|
catch (SystemMessageException e)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
* Copyright (c) 2006, 2010 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -61,6 +61,7 @@
|
||||||
* David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
|
* David McKnight (IBM) - [281712] [dstore] Warning message is needed when disk is full
|
||||||
* David McKnight (IBM) - [284056] Sychronize Cache causes the UI to hang with no way out
|
* David McKnight (IBM) - [284056] Sychronize Cache causes the UI to hang with no way out
|
||||||
* David McKnight (IBM) - [284420] nullprogressmonitor is needed
|
* David McKnight (IBM) - [284420] nullprogressmonitor is needed
|
||||||
|
* David McKnight (IBM) - [298440] jar files in a directory can't be pasted to another system properly
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.services.dstore.files;
|
package org.eclipse.rse.internal.services.dstore.files;
|
||||||
|
@ -1087,21 +1088,21 @@ public class DStoreFileService extends AbstractDStoreService implements IFileSer
|
||||||
if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_SUCCESS_TYPE))
|
if (resultChild.getType().equals(IUniversalDataStoreConstants.DOWNLOAD_RESULT_SUCCESS_TYPE))
|
||||||
{
|
{
|
||||||
// do standard conversion if this is text!
|
// do standard conversion if this is text!
|
||||||
if (!isBinaries[i]){ // do standard conversion if this is text!
|
if (!isBinaries[j]){ // do standard conversion if this is text!
|
||||||
String localEncoding = SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
|
String localEncoding = SystemEncodingUtil.getInstance().getLocalDefaultEncoding();
|
||||||
IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(hostEncodings[i], this);
|
IFileServiceCodePageConverter codePageConverter = CodePageConverterManager.getCodePageConverter(hostEncodings[j], this);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
codePageConverter.convertFileFromRemoteEncoding(remoteElement.getName(), localFile, hostEncodings[i], localEncoding, this);
|
codePageConverter.convertFileFromRemoteEncoding(remoteElement.getName(), localFile, hostEncodings[j], localEncoding, this);
|
||||||
}
|
}
|
||||||
catch (RuntimeException e){
|
catch (RuntimeException e){
|
||||||
Throwable ex = e.getCause();
|
Throwable ex = e.getCause();
|
||||||
StringBuffer msgTxtBuffer = new StringBuffer(RSEServicesMessages.FILEMSG_OPERATION_FAILED);
|
StringBuffer msgTxtBuffer = new StringBuffer(RSEServicesMessages.FILEMSG_OPERATION_FAILED);
|
||||||
msgTxtBuffer.append('\n');
|
msgTxtBuffer.append('\n');
|
||||||
msgTxtBuffer.append('\n');
|
msgTxtBuffer.append('\n');
|
||||||
msgTxtBuffer.append(remoteFiles[i]);
|
msgTxtBuffer.append(remoteFiles[j]);
|
||||||
msgTxtBuffer.append('\n');
|
msgTxtBuffer.append('\n');
|
||||||
msgTxtBuffer.append(hostEncodings[i]);
|
msgTxtBuffer.append(hostEncodings[j]);
|
||||||
msgTxtBuffer.append(" -> ");
|
msgTxtBuffer.append(" -> ");
|
||||||
msgTxtBuffer.append(localEncoding);
|
msgTxtBuffer.append(localEncoding);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue