Jamie, I tried to add the following code to log the file permissions:

    QStringList runtimeDirs = 
QStandardPaths::standardLocations(QStandardPaths::RuntimeLocation);
    QString runtimeDir = (runtimeDirs.size() > 0 && !runtimeDirs[0].isEmpty()) 
? runtimeDirs[0] : qgetenv("XDG_RUNTIME_DIR");
    if (runtimeDir.isEmpty()) {
        qWarning() << "[StateSaver] No XDG_RUNTIME_DIR path set, cannot create 
appstate file.";
        return;
    }
    QString path = 
QString("%1/%2/statesaver.appstate").arg(runtimeDir).arg(applicationName);
    qDebug() << "[StateSaver] PATH" << path;

    // log permissions
    QFile::Permissions wanted = QFile::ReadUser | QFile::WriteUser | 
QFile::ExeUser;
    QFile xdg(runtimeDir);
    qDebug() << QString("[StateSaver] PERMISSIONS %1 WANTED 
%2").arg(xdg.permissions(), 0, 16).arg(wanted, 0, 16);

And I'm getting the following result:
QStandardPaths: wrong permissions on runtime directory /run/user/32011
[StateSaver] PATH "/run/user/32011/com.ubuntu.camera/statesaver.appstate"
"[StateSaver] PERMISSIONS 7700 WANTED 700"

So, QFile::permissions() return 0x7700 for XDG_RUNTIME_DIR, which is
weird!

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

Title:
  StateSaver is not working on devices

Status in Ubuntu UI Toolkit:
  Confirmed
Status in “apparmor-easyprof-ubuntu” package in Ubuntu:
  Fix Released
Status in “camera-app” package in Ubuntu:
  Fix Released

Bug description:
  build 212
  The StateSaver is not working anymore on devices, so apps saved state is no 
longer restored when they are relaunched after being killed by oom killer (or 
manually via kill -2)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-ui-toolkit/+bug/1363112/+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

Reply via email to