Merge lp:~vrruiz/unity-webapps-qml/fix-sharelocalapps into lp:unity-webapps-qml

Proposed by Víctor R. Ruiz
Status: Merged
Approved by: Francis Ginther
Approved revision: 36
Merged at revision: 36
Proposed branch: lp:~vrruiz/unity-webapps-qml/fix-sharelocalapps
Merge into: lp:unity-webapps-qml
Diff against target: 22 lines (+10/-2)
1 file modified
src/Ubuntu/UnityWebApps/plugin/unity-webapps-api.cpp (+10/-2)
To merge this branch: bzr merge lp:~vrruiz/unity-webapps-qml/fix-sharelocalapps
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Francis Ginther Approve
Robert Bruce Park (community) Approve
Review via email: mp+179945@code.launchpad.net

Commit message

Create ./local/share/applications when not available

Description of the change

Create ./local/share/applications when not available

To post a comment you must log in.
Revision history for this message
Robert Bruce Park (robru) wrote :

lgtm

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Francis Ginther (fginther) wrote :

Had to remove the autopilot functional tests as they don't work in the current environment. Re-approving.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Ubuntu/UnityWebApps/plugin/unity-webapps-api.cpp'
2--- src/Ubuntu/UnityWebApps/plugin/unity-webapps-api.cpp 2013-07-31 18:33:44 +0000
3+++ src/Ubuntu/UnityWebApps/plugin/unity-webapps-api.cpp 2013-08-13 15:25:19 +0000
4@@ -128,8 +128,16 @@
5 }
6
7 QDir home(userhomeList.at(0));
8- QString desktopFilePath =
9- QDir::cleanPath(home.absolutePath() + QDir::separator() + ".local/share/applications/" + desktopId);
10+ QString shareDirPath(home.absolutePath() + QDir::separator() + ".local/share/applications/");
11+
12+ // Create the directory if it doesn't exist
13+ QDir shareDir(shareDirPath);
14+ if (!shareDir.exists())
15+ {
16+ shareDir.mkpath(".");
17+ }
18+
19+ QString desktopFilePath = QDir::cleanPath(shareDirPath + desktopId);
20
21 // Should not happen
22 if (QFile::exists(desktopFilePath))

Subscribers

People subscribed via source and target branches

to all changes: