Bug 202668 - [Supertransfer] Subfolders not copied when doing first copy from dstore to Local
Summary: [Supertransfer] Subfolders not copied when doing first copy from dstore to Local
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Xuan Chen CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords:
: 202674 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-09-07 13:22 EDT by Kevin Doyle CLA
Modified: 2007-09-26 19:48 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Doyle CLA 2007-09-07 13:22:50 EDT
After doing a copy with supertransfer enabled the sub folders of the folder I copied are empty.  DStore to Local is causing this problem.  Local to DStore works fine for me.

Steps to Reproduce: 
1. Start with a CLEAN workspace.  Connect to a dstore machine.
2. Find a folder that has sub folders that aren't empty.  Copy that folder to Local.
3. Expand the folder and the sub folders are empty.
-> If you do the same copy again then all the files are copied fine.  It's only the initial copy that doesn't work.

-----------Enter bugs above this line-----------
TM 2.0.1 Testing
installation : eclipse-SDK-3.3
RSE install  : Dev Driver
java.runtime : Sun 1.5.0_11-b03
os.name:     : Windows XP, Service Pack 2
------------------------------------------------
Comment 1 Xuan Chen CLA 2007-09-09 13:09:49 EDT
*** Bug 202674 has been marked as a duplicate of this bug. ***
Comment 2 Xuan Chen CLA 2007-09-09 13:19:41 EDT
The reason for this problem is the following:

In UniversalFileTransferUtility#copyWorkspaceResourcesToRemote(SystemWorkspaceResourceSet workspaceSet, IRemoteFile targetFolder, IProgressMonitor monitor, boolean checkForCollisions), 

if (doCompressedTransfer && doSuperTransferPreference && !destInArchive && !isTargetLocal)
{
	compressedCopyWorkspaceResourceToRemote(directory, newTargetFolder, monitor);					
}
else
{
	IResource[] children = directory.members();	
	^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^			
	SystemWorkspaceResourceSet childSet = new SystemWorkspaceResourceSet(children);			
	SystemRemoteResourceSet childResults = copyWorkspaceResourcesToRemote(childSet, newTargetFolder, monitor, checkForCollision);		
	if (childResults == null)
	{
		return null;
	}						
	if (childResults.hasMessage())
	{
		resultSet.setMessage(childResults.getMessage());
	}
}	

The "IResource[] children = directory.members();" call returned an empty array even directory already has children in the file system.
I added "directory.refreshLocal(IResource.DEPTH_ONE, monitor);" before it, and it seems solve the problem.
Comment 3 Xuan Chen CLA 2007-09-13 10:32:49 EDT
I verified the scenario in 2.0.1 RC1 driver, and it worked properly.
Kevin, could you please verify it as well?  Thanks.
Comment 4 Kevin Doyle CLA 2007-09-13 10:58:58 EDT
Verified fixed with 2.0.1RC1.