Merge lp:~ken-vandine/content-hub/lp1373086 into lp:content-hub

Proposed by Ken VanDine
Status: Merged
Approved by: Michael Sheldon
Approved revision: 141
Merged at revision: 145
Proposed branch: lp:~ken-vandine/content-hub/lp1373086
Merge into: lp:content-hub
Diff against target: 17 lines (+5/-2)
1 file modified
import/Ubuntu/Content/contentitem.cpp (+5/-2)
To merge this branch: bzr merge lp:~ken-vandine/content-hub/lp1373086
Reviewer Review Type Date Requested Status
Michael Sheldon (community) Approve
Andrew Hayzen (community) Approve
PS Jenkins bot continuous-integration Approve
Review via email: mp+237459@code.launchpad.net

Commit message

Fall back to a copy if move fails

Description of the change

Fall back to a copy if move fails

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Ken VanDine (ken-vandine) wrote :

Are there any related MPs required for this MP to build/function as expected? Please list.

 * No

Is your branch in sync with latest trunk (e.g. bzr pull lp:trunk -> no changes)

 * Yes

Did you perform an exploratory manual test run of your code change and any related functionality on device or emulator?

 * Yes

Did you successfully run all tests found in your component's Test Plan (https://wiki.ubuntu.com/Process/Merges/TestPlan/content-hub) on device or emulator?

 * Yes

If you changed the UI, was the change specified/approved by design?

 * NA

If you changed UI labels, did you update the pot file?

 * NA

If you changed the packaging (debian), did you add a core-dev as a reviewer to this MP?

 * NA

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

This fixes the issue of move() not working for the music-app while under confinement thanks :)

review: Approve
142. By Ken VanDine

merged trunk

Revision history for this message
Michael Sheldon (michael-sheldon) wrote :

Did you perform an exploratory manual test run of the code change and any related functionality on device or emulator?

 * Yes

Did CI run pass? If not, please explain why.

 * Yes

Have you checked that submitter has accurately filled out the submitter checklist and has taken no shortcut?

 * Yes

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'import/Ubuntu/Content/contentitem.cpp'
2--- import/Ubuntu/Content/contentitem.cpp 2014-07-14 12:32:27 +0000
3+++ import/Ubuntu/Content/contentitem.cpp 2014-10-08 15:46:59 +0000
4@@ -205,8 +205,11 @@
5 TRACE() << Q_FUNC_INFO << "New path:" << destFilePath;
6
7 if (not QFile::rename(fi.absoluteFilePath(), destFilePath)) {
8- qWarning() << "Failed to move content to:" << destFilePath;
9- return false;
10+ qWarning() << "Failed to move content to:" << destFilePath << "falling back to copy";
11+ if (not QFile::copy(fi.absoluteFilePath(), destFilePath)) {
12+ qWarning() << "Failed to copy content to:" << destFilePath;
13+ return false;
14+ }
15 }
16
17 setUrl(QUrl::fromLocalFile(destFilePath));

Subscribers

People subscribed via source and target branches