| Summary: | Attempt to download as zip on empty directory gives ugly message. | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | Mike Wilson <Mike_Wilson> | ||||||||
| Component: | Server | Assignee: | Anthony Hunter <ahunter.eclipse> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | minor | ||||||||||
| Priority: | P3 | CC: | ahunter.eclipse, Szymon.Brandys | ||||||||
| Version: | 0.2 | Keywords: | polish | ||||||||
| Target Milestone: | 3.0 RC2 | Flags: | john.arthorne:
review+
|
||||||||
| Hardware: | PC | ||||||||||
| OS: | Mac OS X | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
Created attachment 197628 [details]
Fix v01
Zips can't be empty, so this fix just avoids adding the "export" link for empty directories.
Ping, Szymon can you review. If I add a file to an empty folder, the export icon will not show up. The same if we delete all folder content, the export icon remains and clicking it will end up with 404. We either need extra UI changes, see the attachment with refreshing during create and deleting file/folder. But we should add similar code to import, copy/move operations probably too. The code is not optimal though. Or we could return an empty zip file. I was able to create one, we could keep in on the server side and return if a folder to export is empty :) Created attachment 197762 [details]
A sample fix for client.core
Created attachment 197763 [details]
Empty zip file
I checked that for Move and Copy operations the tree is refreshed and the Export icon shows up when we copy/move something to an empty folder. However I was not able to check what happens for Import operations. Zip import seems to be partially broken i.e. stuff is imported, but the tree is not refreshed. John do you see this too? Deferring. This is becoming too complicated for a cosmetic fix. There is no value in downloading an empty folder as a zip. The 404 page isn't pretty but we can live with it for 0.2. Note I think your client changes make sense anyway. When adding/deleting a file the parent should be refreshed, otherwise the cached item in the client has an incorrect Children entry. Your patch should be revisited posted 0.2 (shouldn't need to refresh both parent and child though). (In reply to comment #7) > Deferring. This is becoming too complicated for a cosmetic fix. There is no > value in downloading an empty folder as a zip. The 404 page isn't pretty but we > can live with it for 0.2. > To be clear: I wasn't requesting that we fix this for 0.2, just capturing the bug so we wouldn't lose it. (In reply to comment #1) > Created attachment 197628 [details] > Fix v01 > > Zips can't be empty, so this fix just avoids adding the "export" link for > empty directories. This fix from John solved the original issue that Mike reported. I would suggest we simply deliver to resolve the original issue as reported. I have updated the change at: https://github.com/ahunter-orion/orion.server/commit/043d3c78a51ac2271fb8115ce268b8d4707827ce I assert that John authored 100% of the content of this contribution and I have the rights to donate the content again to Eclipse under the EPL since I just updated for the latest Orion bits. |
Steps to reproduce: 1) Create a new folder at the root. 2) Click "download as zip" button beside the folder Result: 404 page " HTTP ERROR 404 Problem accessing /xfer/export/a.zip. Reason: The folder is empty Powered by Jetty:// "