Community
Participate
Working Groups
To reproduce: 1. download and install orion 5.0 (eclipse-orion-5.0-macosx.cocoa.x86_64.zip in my case) 2. unzip it. by default it creates a folder called 'eclipse' 2. launch it, create a project, and add some files 3. close it 4. rename the 'eclipse' folder to something else, like 'orion' 5. launch it again and note that the files under your newly created project are gone
It seems the server stores the ContentLocation for each project as an absolute path: > // my%20project.json > { "ContentLocation": "file:/C:/Users/mamacdon/orion/eclipse/serverworkspace/aa/aaa/OrionContent1/my%20project", If the server workspace ever gets moved or renamed, all these paths will be wrong.
Yes, we have hit this before. It is redundant to store a ContentLocation for a project in the default location, so we should fix this.
(In reply to Mark Macdonald from comment #1) > It seems the server stores the ContentLocation for each project as an > absolute path: > > // my%20project.json > > { "ContentLocation": "file:/C:/Users/mamacdon/orion/eclipse/serverworkspace/aa/aaa/OrionContent1/my%20project", > > If the server workspace ever gets moved or renamed, all these paths will be > wrong. I plan to fix this with the work in Bug 439732.
I plan to replace inside the currently stored metadata: "ContentLocation": "file:/C:/Users/mamacdon/orion/eclipse/serverworkspace/aa/aaa/OrionContent1/my%20project" with "ContentLocation": "${SERVERWORKSPACE}/aa/aaa/OrionContent1/my%20project" In this case the serverworkspace folder is C:/Users/mamacdon/orion/eclipse/serverworkspace. (i.e. so the serverworkspace folder is replaced with ${SERVERWORKSPACE}) This will simply be an operation that is done when reading and writing the metadata (JSON) files. The server will still make use of the existing ProjectInfo API which provides URI getContentLocation() and IFileStore getProjectStore(). If you see any issues with this let me know.
The changes were delivered into branch ah-Bug439732 with commit: http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=88ba908d61967c245f8fc8915044f2854798793e Will mark resolved once Bug 439732 gets pushed.
(In reply to Anthony Hunter from comment #5) > The changes were delivered into branch ah-Bug439732 with commit: > http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/ > ?id=88ba908d61967c245f8fc8915044f2854798793e > > Will mark resolved once Bug 439732 gets pushed. I am pushing the branch to master