[Touch-packages] [Bug 1483589] [NEW] Can't import a file with the same name in a ContentStore scope

2015-08-11 Thread Didier Roche
Public bug reported:

Having a ContentStore for a particular scope doesn't enable to import
more than once a file name.

If you use:
ContentStore {
id: appStore
scope: ContentScope.App
}

and then:
peer.request(appStore)

- the state transfer changed go to initiated, in progress and
abort the second time you try to import the same file, not giving you
even a chance to rename it.

It doesn't only abort if the files are the same as touch foo.png for instance 
have the same effect.
A solution is for now to store in the temp directory, have a app scoped 
ContentStore to grab the uri and use contentitem.move() directly.

** Affects: content-hub
 Importance: Undecided
 Status: New

** Affects: content-hub (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: devexp

** Also affects: content-hub (Ubuntu)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to content-hub in Ubuntu.
https://bugs.launchpad.net/bugs/1483589

Title:
  Can't import a file with the same name in a ContentStore scope

Status in content-hub:
  New
Status in content-hub package in Ubuntu:
  New

Bug description:
  Having a ContentStore for a particular scope doesn't enable to import
  more than once a file name.

  If you use:
  ContentStore {
  id: appStore
  scope: ContentScope.App
  }

  and then:
  peer.request(appStore)

  - the state transfer changed go to initiated, in progress and
  abort the second time you try to import the same file, not giving
  you even a chance to rename it.

  It doesn't only abort if the files are the same as touch foo.png for 
instance have the same effect.
  A solution is for now to store in the temp directory, have a app scoped 
ContentStore to grab the uri and use contentitem.move() directly.

To manage notifications about this bug go to:
https://bugs.launchpad.net/content-hub/+bug/1483589/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp


[Touch-packages] [Bug 1483589] [NEW] Can't import a file with the same name in a ContentStore scope

2015-08-11 Thread Launchpad Bug Tracker
You have been subscribed to a public bug:

Having a ContentStore for a particular scope doesn't enable to import
more than once a file name.

If you use:
ContentStore {
id: appStore
scope: ContentScope.App
}

and then:
peer.request(appStore)

- the state transfer changed go to initiated, in progress and
abort the second time you try to import the same file, not giving you
even a chance to rename it.

It doesn't only abort if the files are the same as touch foo.png for instance 
have the same effect.
One solution would have been to keep storing in the temp directory (so no 
argument to peer.request(), grab the uri of a through an app scoped 
ContentStore and use contentitem.move() directly.

However, this isn't possible as ContentStore.uri gives: Accessing ContentStore 
uri with NULL internal store
and we can't access to it.

Another reason it would be insteresting to have the ContentStore.uri
path outside of any transfer would be to reference only relative paths
for instance in Image {} components and so on, independant of the
absolute full path.h

** Affects: content-hub (Ubuntu)
 Importance: Undecided
 Status: New


** Tags: devexp
-- 
Can't import a file with the same name in a ContentStore scope
https://bugs.launchpad.net/bugs/1483589
You received this bug notification because you are a member of Ubuntu Touch 
seeded packages, which is subscribed to content-hub in Ubuntu.

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp