Cannot import two files with the same name to ContentStore.App
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | content-hub |
Fix Released
|
Critical
|
Ken VanDine | |
| | content-hub (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
When you import a file using a ContentScope and ContentStore.App, it gets copied to ~/.local/
My expectation is that the new file should be copied to file(1) or similar. Perhaps this should only happen if the files are distinct. Failing this, ContentHub should throw an error and not let me think that the import succeeded.
Related branches
- Michael Sheldon (community): Approve on 2015-03-19
- PS Jenkins bot: Approve (continuous-integration) on 2015-03-18
-
Diff: 119 lines (+33/-10)3 files modifiedsrc/com/ubuntu/content/detail/transfer.cpp (+10/-4)
src/com/ubuntu/content/utils.cpp (+4/-0)
tests/acceptance-tests/app_hub_communication_transfer.cpp (+19/-6)
| Changed in content-hub: | |
| status: | New → Triaged |
| status: | Triaged → Confirmed |
| importance: | Undecided → High |
| importance: | High → Critical |
| assignee: | nobody → Ken VanDine (ken-vandine) |
| Robert Schroll (rschroll) wrote : | #2 |
Just to check my understanding, this change will cause an error when trying to import a file with the same name as one that already exists. Thus, there will be no way to import such a file while using a ContentScope. Correct?
| Changed in content-hub: | |
| status: | Confirmed → Fix Released |
| Ken VanDine (ken-vandine) wrote : | #3 |
@rschroll: correct, it'll abort the transfer, for now. In the future, we'll be implementing an error API so we can send it to an error state with a defined reason for the error.

This bug was fixed in the package content-hub - 0.0+15. 04.20150319- 0ubuntu1
--------------- 04.20150319- 0ubuntu1) vivid; urgency=medium
content-hub (0.0+15.
[ Ken VanDine ]
* Abort transfers when a file already exists matching the requested
name and ContentStore. (LP: #1429687)
-- CI Train Bot <email address hidden> Thu, 19 Mar 2015 15:27:11 +0000