Cannot import two files with the same name to ContentStore.App

Bug #1429687 reported by Robert Schroll
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
content-hub
Fix Released
Critical
Ken VanDine
content-hub (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

When you import a file using a ContentScope and ContentStore.App, it gets copied to ~/.local/share/<appid>/<content-type>/<filename>. If you try to import another file with the same name and content type, the existing file will be left in place and the new file not copied over. However, you get a ContentItem returned with the a URL pointing to the old imported file.

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

Changed in content-hub:
status: New → Triaged
status: Triaged → Confirmed
importance: Undecided → High
importance: High → Critical
assignee: nobody → Ken VanDine (ken-vandine)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package content-hub - 0.0+15.04.20150319-0ubuntu1

---------------
content-hub (0.0+15.04.20150319-0ubuntu1) vivid; urgency=medium

  [ 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

Changed in content-hub (Ubuntu):
status: New → Fix Released
Revision history for this message
Robert Schroll (rschroll) wrote :

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
Revision history for this message
Ken VanDine (ken-vandine) wrote :

@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.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.