Bad persistent directory path

Bug #1248632 reported by Víctor R. Ruiz on 2013-11-06
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cordova Ubuntu
Cordova Ubuntu Tests
Víctor R. Ruiz
cordova-ubuntu-tests (Ubuntu)

Bug Description

In my system now this path:
LOCAL_PERSISTENT_PATH= os.path.join(os.environ['HOME'], '.local/share/cordova-ubuntu/persistent/L2hvbWUvdnJydWl6L3dlYmFwcHMvbHAvY29yZG92YS11YnVudHUtdGVzdHMvd3d3')

should be this one instead:
LOCAL_PERSISTENT_PATH= os.path.join(os.environ['HOME'], '.local/share/cordova-ubuntu/persistent/L2hvbWUvdWJ1bnR1L2NvcmRvdmEtdWJ1bnR1LXRlc3RzL3d3dw==/')

We need a way to know the local persistent path that Cordova is using.

Related branches

Víctor R. Ruiz (vrruiz) on 2013-11-06
Changed in cordova-ubuntu-tests:
assignee: nobody → Víctor R. Ruiz (vrruiz)
Robert Bruce Park (robru) wrote :

Is there any reason that we can't just do this?


It would protect it against any future changes of this seemingly random string. Is there ever a situation in which there's more than one of these directories at a time?

Robert Bruce Park (robru) wrote :

Should be, sorry:

    glob(os.environ['HOME'] + '/.local/share/cordova-ubuntu/persistent/*/')[0]

> glob(os.environ['HOME'] + '/.local/share/cordova-
> ubuntu/persistent/*/')[0]

Apparently, each qml file generates its own directory, so depending if
Cordova Ubuntu tests have called main-local.qml or main.qml, there
exists one or two directories.

Víctor R. Ruiz (vrruiz) wrote :

The relevant code in Cordova Ubuntu is this

m_persistentDir(QDir::homePath() + "/.local/share/cordova-ubuntu/persistent/" + QString(cordova->get_app_dir().toUtf8().toBase64()))

QString Cordova::get_app_dir() {
    return m_www.absolutePath();

So, in theory, doing something like base64.b64encode(absolute_path_dir) should work.

Robert Bruce Park (robru) wrote :

What is the value of absolute_path_dir?

Maxim Ermilov (zaspire) wrote :

> So, in theory, doing something like base64.b64encode(absolute_path_dir) should work

PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:cordova-ubuntu-tests at revision 34, scheduled for release in cordova-ubuntu-tests, milestone Unknown

Changed in cordova-ubuntu-tests:
status: New → Fix Committed
Maxim Ermilov (zaspire) on 2014-04-25
Changed in cordova-ubuntu:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers