| Summary: | [client] "delete folder" on linked folder deletes underlying data | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Susan McCourt <susan> | ||||
| Component: | Client | Assignee: | John Arthorne <john.arthorne> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | bokowski, john.arthorne | ||||
| Version: | 0.2 | ||||||
| Target Milestone: | 0.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Susan McCourt
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
|