View | Details | Raw Unified | Return to bug 191367 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/rse/files/ui/resources/UniversalFileTransferUtility.java (+9 lines)
Lines 22-27 Link Here
22
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
22
 * Martin Oberhuber (Wind River) - [189130] Move SystemIFileProperties from UI to Core
23
 * Xuan Chen        (IBM)        - [187548] Editor shows incorrect file name after renaming file on Linux dstore
23
 * Xuan Chen        (IBM)        - [187548] Editor shows incorrect file name after renaming file on Linux dstore
24
 * David McKnight   (IBM)        - [191472] should not use super transfer with SSH/FTP Folder Copy and Paste
24
 * David McKnight   (IBM)        - [191472] should not use super transfer with SSH/FTP Folder Copy and Paste
25
 * Xuan Chen (IBM)        - [191367] with supertransfer on, Drag & Drop Folder from DStore to DStore doesn't work
25
 ********************************************************************************/
26
 ********************************************************************************/
26
27
27
package org.eclipse.rse.files.ui.resources;
28
package org.eclipse.rse.files.ui.resources;
Lines 73-78 Link Here
73
import org.eclipse.rse.services.files.RemoteFileSecurityException;
74
import org.eclipse.rse.services.files.RemoteFileSecurityException;
74
import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
75
import org.eclipse.rse.services.files.RemoteFolderNotEmptyException;
75
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
76
import org.eclipse.rse.subsystems.files.core.SystemIFileProperties;
77
import org.eclipse.rse.subsystems.files.core.model.RemoteFileFilterString;
76
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
78
import org.eclipse.rse.subsystems.files.core.model.RemoteFileUtility;
77
import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
79
import org.eclipse.rse.subsystems.files.core.model.SystemFileTransferModeRegistry;
78
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
80
import org.eclipse.rse.subsystems.files.core.servicesubsystem.FileServiceSubSystem;
Lines 1480-1485 Link Here
1480
			targetFS.copy(compressedFolder, newTargetParent, newTargetFolder.getName(), monitor);
1482
			targetFS.copy(compressedFolder, newTargetParent, newTargetFolder.getName(), monitor);
1481
			
1483
			
1482
			// delete the temp remote archive
1484
			// delete the temp remote archive
1485
			//Since this archive file has never been cache before, a default filter DStore Element
1486
			//will be created before we send down "delete" commad to dstore server. Since "delete" 
1487
			//command is not a registered command for a filter
1488
			//element, the delete command query will not be sent to dstore server.
1489
			//To overcome this problem, we need to do query on it first to cache
1490
			//its information so that it could be deleted properly.
1491
			targetFS.resolveFilterString(newPath + RemoteFileFilterString.SWITCH_NOSUBDIRS, monitor);
1483
			targetFS.delete(remoteArchive, monitor);
1492
			targetFS.delete(remoteArchive, monitor);
1484
			
1493
			
1485
			monitor.done();
1494
			monitor.done();
(-)miners/org/eclipse/rse/dstore/universal/miners/UniversalFileSystemMiner.java (-20 / +57 lines)
Lines 20-25 Link Here
20
 * Kevin Doyle (IBM) - [195709] Windows Copying doesn't work when path contains space
20
 * Kevin Doyle (IBM) - [195709] Windows Copying doesn't work when path contains space
21
 * Kevin Doyle (IBM) - [196211] DStore Move tries rename if that fails copy/delete
21
 * Kevin Doyle (IBM) - [196211] DStore Move tries rename if that fails copy/delete
22
 * Xuan Chen (IBM)        - [198046] [dstore] Cannot copy a folder into an archive file
22
 * Xuan Chen (IBM)        - [198046] [dstore] Cannot copy a folder into an archive file
23
 * Xuan Chen (IBM)        - [191367] with supertransfer on, Drag & Drop Folder from DStore to DStore doesn't work
23
 *******************************************************************************/
24
 *******************************************************************************/
24
25
25
package org.eclipse.rse.dstore.universal.miners;
26
package org.eclipse.rse.dstore.universal.miners;
Lines 2256-2261 Link Here
2256
	    String newName = nameObj.getName();
2257
	    String newName = nameObj.getName();
2257
		String targetType = targetFolder.getType();
2258
		String targetType = targetFolder.getType();
2258
		String srcType = sourceFile.getType();
2259
		String srcType = sourceFile.getType();
2260
		//In the case of super transfer, the source file is a virtual file/folder inside the temporary zip file, and its type information is set to 
2261
		//default UNIVERSAL_FILTER_DESCRIPTOR since its information never been cached before.
2262
		//We need to find out its real type first before going to different if statement.
2263
		File srcFile = null;
2264
		VirtualChild child = null;
2265
		if (IUniversalDataStoreConstants.UNIVERSAL_FILTER_DESCRIPTOR == srcType)
2266
		{
2267
			if (ArchiveHandlerManager.isVirtual(sourceFile.getValue()))
2268
			{
2269
				String goodFullName = ArchiveHandlerManager.cleanUpVirtualPath(sourceFile.getValue());
2270
				child = _archiveHandlerManager.getVirtualObject(goodFullName);
2271
				if (child.exists()) 
2272
				{
2273
					if (child.isDirectory) 
2274
					{
2275
						srcType = IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR;
2276
					} else 
2277
					{
2278
						srcType = IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR;
2279
					}
2280
				}
2281
			}
2282
		}
2259
		
2283
		
2260
		if (targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR) || targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
2284
		if (targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR) || targetType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
2261
			
2285
			
Lines 2268-2291 Link Here
2268
				return statusDone(status);
2292
				return statusDone(status);
2269
			}
2293
			}
2270
2294
2271
			File srcFile = null;
2272
			
2273
			if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)
2295
			if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_FOLDER_DESCRIPTOR)
2274
					|| srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)) {
2296
					|| srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_ARCHIVE_FILE_DESCRIPTOR)) {
2275
				
2297
				
2276
			    srcFile = getFileFor(sourceFile);
2298
			    srcFile = getFileFor(sourceFile);
2277
			}
2299
			}
2278
			else if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
2300
			else if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
2301
				ISystemArchiveHandler shandler = null;
2302
				if (null == child)
2303
				{
2304
					AbsoluteVirtualPath svpath = getAbsoluteVirtualPath(sourceFile);
2305
					shandler = getArchiveHandlerFor(svpath.getContainingArchiveString());
2279
				
2306
				
2280
			    AbsoluteVirtualPath svpath = getAbsoluteVirtualPath(sourceFile);
2307
					if (shandler == null) {
2281
				ISystemArchiveHandler shandler = getArchiveHandlerFor(svpath.getContainingArchiveString());
2308
						status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
2282
				
2309
						return statusDone(status);
2283
				if (shandler == null) {
2310
					}
2284
					status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
2311
					child = shandler.getVirtualFile(svpath.getVirtualPart());
2285
					return statusDone(status);
2312
				}
2313
				else
2314
				{
2315
					//If child is not null, it means the sourceFile is a type of UNIVERSAL_FILTER_DESCRIPTOR, and has already been handled
2316
					shandler = child.getHandler();
2286
				}
2317
				}
2287
				
2288
				VirtualChild child = shandler.getVirtualFile(svpath.getVirtualPart());
2289
				srcFile = child.getExtractedFile();
2318
				srcFile = child.getExtractedFile();
2290
			}
2319
			}
2291
2320
Lines 2305-2321 Link Here
2305
			}
2334
			}
2306
		}
2335
		}
2307
		else if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
2336
		else if (srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FILE_DESCRIPTOR) || srcType.equals(IUniversalDataStoreConstants.UNIVERSAL_VIRTUAL_FOLDER_DESCRIPTOR)) {
2337
			ISystemArchiveHandler shandler = null;
2338
			AbsoluteVirtualPath svpath = null;
2339
			if (null == child)
2340
			{
2341
				svpath = getAbsoluteVirtualPath(sourceFile);
2342
				shandler = getArchiveHandlerFor(svpath.getContainingArchiveString());
2308
			
2343
			
2309
		    // extract from an archive to folder
2344
				if (shandler == null) {
2310
			AbsoluteVirtualPath svpath = getAbsoluteVirtualPath(sourceFile);
2345
					status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
2311
			ISystemArchiveHandler shandler = getArchiveHandlerFor(svpath.getContainingArchiveString());
2346
					return statusDone(status);
2312
			
2347
				}
2313
			if (shandler == null) {
2348
				child = shandler.getVirtualFile(svpath.getVirtualPart());
2314
				status.setAttribute(DE.A_SOURCE, IServiceConstants.FAILED);
2349
			}
2315
				return statusDone(status);
2350
			else
2351
			{
2352
				//If child is not null, it means the sourceFile is a type of UNIVERSAL_FILTER_DESCRIPTOR, and has already been handled
2353
				shandler = child.getHandler();
2354
				svpath = getAbsoluteVirtualPath(sourceFile.getValue());
2316
			}
2355
			}
2317
			
2318
			VirtualChild child = shandler.getVirtualFile(svpath.getVirtualPart());
2319
2356
2320
			File parentDir = getFileFor(targetFolder);
2357
			File parentDir = getFileFor(targetFolder);
2321
			File destination = new File(parentDir, newName);
2358
			File destination = new File(parentDir, newName);
Lines 2329-2335 Link Here
2329
		}
2366
		}
2330
		else {
2367
		else {
2331
			File tgtFolder = getFileFor(targetFolder);
2368
			File tgtFolder = getFileFor(targetFolder);
2332
			File srcFile = getFileFor(sourceFile);
2369
			srcFile = getFileFor(sourceFile);
2333
2370
2334
			// regular copy
2371
			// regular copy
2335
			boolean folderCopy = srcFile.isDirectory();
2372
			boolean folderCopy = srcFile.isDirectory();
(-)src/org/eclipse/rse/internal/subsystems/files/core/ISystemFilePreferencesConstants.java (-2 / +3 lines)
Lines 13-19 Link Here
13
 * 
13
 * 
14
 * Contributors:
14
 * Contributors:
15
 * {Name} (company) - description of contribution.
15
 * {Name} (company) - description of contribution.
16
 * David McKnight  (IBM) - [191367] seeting supertransfer to be disabled by default
16
 * David McKnight  (IBM) - [191367] setting supertransfer to be disabled by default
17
 * Xuan Chen (IBM)       - [191367] setting supertransfer back to enabled by default
17
 *******************************************************************************/
18
 *******************************************************************************/
18
19
19
package org.eclipse.rse.internal.subsystems.files.core;
20
package org.eclipse.rse.internal.subsystems.files.core;
Lines 46-52 Link Here
46
	public static final int FILETRANSFERMODE_TEXT 				= 1;
47
	public static final int FILETRANSFERMODE_TEXT 				= 1;
47
	
48
	
48
	public static final String DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE 	= "zip"; //$NON-NLS-1$
49
	public static final String DEFAULT_SUPERTRANSFER_ARCHIVE_TYPE 	= "zip"; //$NON-NLS-1$
49
	public static final boolean DEFAULT_DOSUPERTRANSFER 			= false;
50
	public static final boolean DEFAULT_DOSUPERTRANSFER 			= true;
50
	
51
	
51
	public static final int DEFAULT_DOWNLOAD_BUFFER_SIZE        = 40;
52
	public static final int DEFAULT_DOWNLOAD_BUFFER_SIZE        = 40;
52
	
53
	

Return to bug 191367