~osomon/webbrowser-app/qt-labs-settings

« back to all changes in this revision

Viewing changes to src/Ubuntu/Web/plugin.cpp

  • Committer: CI Train Bot
  • Author(s): Olivier Tilloy
  • Date: 2015-02-27 10:08:05 UTC
  • mfrom: (910.2.2 cacheLocation)
  • Revision ID: ci-train-bot@canonical.com-20150227100805-smvhmd3ixfff3ve9
Specify the cache path on the web context, to avoid caching data under ~/.local/share/. Fixes: #1424726

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
    QDir location(QStandardPaths::writableLocation(QStandardPaths::DataLocation));
89
89
    if (!location.exists()) {
90
90
        QDir::root().mkpath(location.absolutePath());
 
91
    } else {
 
92
        // Prior to fixing https://launchpad.net/bugs/1424726, chromium’s cache
 
93
        // data was written to the data location. Purge the old cache data.
 
94
        QDir(location.absoluteFilePath("Cache")).removeRecursively();
91
95
    }
92
96
    return location.absolutePath();
93
97
}