U1DB creates databases in current directory, not in user-writeable directory as LocalStorage does

Bug #1220481 reported by Dustin Galgarret
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
U1DB Qt/ QML
New
Undecided
Unassigned
u1db-qt (Ubuntu)
New
High
Unassigned
Saucy
New
High
Unassigned

Bug Description

When creating a U1db.Database { path: "myfile.u1db" } myfile.u1db is created in the current directory. On the phone, this file should be created in the app-specific writeable private directory, but the user should not have to explicitly specify that: instead, a file named "myfile.u1db" should automatically be created there without the app developer having to declare that (or even know that).

Excerpt from IRC which may be relevant:

[01:26] <tyhicks> see /usr/share/apparmor/easyprof/templates/ubuntu/1.0/ubuntu-sdk
[01:26] <tyhicks> it includes these rules:
[01:26] <tyhicks> owner @{HOME}/.config/@{APP_PKGNAME}/ rw, # XDG_CONFIG_HOME
[01:26] <tyhicks> owner @{HOME}/.config/@{APP_PKGNAME}/** mrwkl,
[01:27] <tyhicks> mhall119: ^
[01:27] <mhall119> dgalg: ok, so then we should ask that u1db use that as the default location unless an a path is used

Revision history for this message
Jamie Strandboge (jdstrand) wrote :

Better path would probably be in XDG_DATA_HOME. Ie, what corresponds to these rules:
  owner @{HOME}/.local/share/@{APP_PKGNAME}/ rw, # XDG_DATA_HOME
  owner @{HOME}/.local/share/@{APP_PKGNAME}/** mrwklix,

This is perhaps related to bug #1197051.

Changed in u1db-qt (Ubuntu Saucy):
importance: Undecided → High
tags: added: application-confinement
Revision history for this message
Cris Dywan (kalikiana) wrote :

I have a feeling a lot of packages didn't make it to the image and this is one of them. It's already fixed.

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.