Community
Participate
Working Groups
I've always been a little nervous about deleting a linked file. Today I finally tried it. My expectation was that it deletes the folder from the workspace, but does not delete the data linked in the file system (or that it would prompt what to do with the data in the file system). But that's not what happens. It is completely broken. - it deletes the underlying data (!!!!) - it doesn't remove the folder from the workspace list - now I have a folder linking to my data, but it 404s because the data is no longer there. (the only reason I'm not marking this "critical" is that it's only a self hosting scenario, not an orionhub scenario).
John, I marked this [client] but I'm really not sure where the fix goes. It seems like either fileClient or the server should handle this case. I can't imagine that the UI would have to check whether something is a linked folder before asking fileClient to delete it.
From the server API you can delete either the contents or just remove the folder from the workspace without deleting anything. It depends which URL you call the DELETE operation on. I'll take a look to see where the problem is.
This was broken by the multi-file client changes and I think we have to fix it. The deleteProject function in the file client isn't even being called at the moment. This means the *content* of the project gets deleted, but the project itself is not deleted. Once in this state you get 404 errors every time in the top level navigator loads, because projects are expected to exist but their content is missing. There is no way to delete a project at the moment. The problem is this code in fileCommands.js: if (item.parent.Path === "") { fileClient.removeProject(...); } else { fileClient.deleteFile(...); } The parent of a project used to be "", but now it is "/file/". So the else clause is always executed, even for a project.
Created attachment 194357 [details] Fix v01
http://git.eclipse.org/c/e4/org.eclipse.orion.client.git/commit/?id=aff7b4012e29d856de78f82224c2d4aaa09be512