U1DB creates databases in current directory, not in user-writeable directory as LocalStorage does
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/
[01:26] <tyhicks> it includes these rules:
[01:26] <tyhicks> owner @{HOME}
[01:26] <tyhicks> owner @{HOME}
[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
Better path would probably be in XDG_DATA_HOME. Ie, what corresponds to these rules: /.local/ share/@ {APP_PKGNAME} / rw, # XDG_DATA_HOME /.local/ share/@ {APP_PKGNAME} /** mrwklix,
owner @{HOME}
owner @{HOME}
This is perhaps related to bug #1197051.