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

Bug 404964

Summary: Copy and Pasting multiple directories results in concatenated top folder names
Product: [ECD] Orion Reporter: Ken Walker <ken_walker>
Component: NodeAssignee: Ken Walker <ken_walker>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mamacdon
Version: 2.0   
Target Milestone: 4.0 M2   
Hardware: All   
OS: All   
Whiteboard:

Description Ken Walker CLA 2013-04-04 21:41:02 EDT
On the Node server, if you have a directory a few deep a/b/c/d.txt and copy that to another directory you can end up with ab/c/d.txt
Comment 1 Ken Walker CLA 2013-04-04 21:57:07 EDT
New to node file system so here's a first attempt:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=7f05b27753f66b4927636c32842b5eccd174d116

In bug404964 branch
Comment 3 Mark Macdonald CLA 2013-04-15 11:47:11 EDT
Sorry, finally got around to looking at this patch. 
> destPath[destPath.length] === path.sep
This condition will always be false, as s[s.length] is undefined for any string. You need s[s.length - 1] to get the last character. So the path separator will always be appended.

This may not cause any further bugs (i.e. we were probably never calling this method with destPath that ended in "/") but we should fix the code anyway
Comment 4 Ken Walker CLA 2013-04-15 12:13:24 EDT
d'oh, fixing
Comment 5 Ken Walker CLA 2013-12-05 12:04:44 EST
this was fixed