Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 421631

Summary: Pasting top level folder into its own child creates a directory tree of death
Product: [ECD] Orion Reporter: Mark Macdonald <mamacdon>
Component: ServerAssignee: Anthony Hunter <ahunter.eclipse>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: ahunter.eclipse
Version: 3.0   
Target Milestone: 5.0 M1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Mark Macdonald CLA 2013-11-13 10:01:08 EST
McQ found an issue with the navigator where a deep tree of folders can be created, until (presumably) some OS limit is reached.

1. Create a new top-level folder, "foo"
2. Select "foo" in the navigator, and press Ctrl+C.
3. Press Ctrl+V. It should create a child folder:
* foo 
*   foo
4. Now, "pick" the child foo that you just created by clicking on its name. (This will make the folder view target the child)
5. Press Ctrl+V again.
6. You'll see a progress message "Pasting {whatever}" and eventually an error.

At this point you will have a super deep tree of foos:
* foo
*   foo
*     foo
*       ... and so on

I see only a small number of XHRs happening here so I think the issue is on the server.
Comment 1 Anthony Hunter CLA 2013-11-13 10:21:47 EST
I can duplicate this issue.
Comment 2 Anthony Hunter CLA 2013-11-13 11:32:31 EST
The second request is to paste {folder}/foo into {folder}/foo/foo/foo. Server side we fall into an infinite loop in the Eclipse FileStore support copying the children that increases dynamically.

The request is invalid, the destination folder cannot be a descendent of the source folder. 

The problem is fixed with commit:
http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=5c3997b470115a8bf6205108ab4281f2f771b533