Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339140 - Path problems in copy/move implementation
Summary: Path problems in copy/move implementation
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Client (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 0.2   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 334718
  Show dependency tree
 
Reported: 2011-03-07 14:49 EST by John Arthorne CLA
Modified: 2011-09-01 11:41 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2011-03-07 14:49:25 EST
The server implementation of copy/move assumes source paths are server file system locations:

/A/SomeFolder/SomeFile.txt

In practice clients will always send locations that include the file servlet location:

/file/A/SomeFolder/SomeFile.txt

The client can't be expected to strip off the servlet location. This should be done on the server.

The server JUnit tests for copy/move also make this bad assumption.
Comment 1 John Arthorne CLA 2011-03-07 14:52:46 EST
There are also a couple of path manipulation bugs in the client code:

1) The stripPath function in fileCommands.js strips trailing separators in the case of location with a query:

/file/A/?depth=1 -> /file/A

Trailing separators are important in HTTP URLs because they differentiate files from directories. It should be:

/file/A/?depth=1 -> /file/A/


2) fileImpls.js wasn't properly computing the destination name when the source path has a trailing separator.
Comment 2 John Arthorne CLA 2011-03-07 14:56:29 EST
Fixes for all problems pushed.