Merge lp:~azzar1/unity/thumbnailer-mkdir-parents-dirs into lp:unity

Proposed by Andrea Azzarone on 2017-06-07
Status: Merged
Approved by: Marco Trevisan (Treviño) on 2017-06-09
Approved revision: 4238
Merged at revision: 4238
Proposed branch: lp:~azzar1/unity/thumbnailer-mkdir-parents-dirs
Merge into: lp:unity
Diff against target: 11 lines (+1/-1)
1 file modified
unity-shared/ThumbnailGenerator.cpp (+1/-1)
To merge this branch: bzr merge lp:~azzar1/unity/thumbnailer-mkdir-parents-dirs
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) 2017-06-07 Approve on 2017-06-09
Review via email: mp+325247@code.launchpad.net

Commit Message

Use g_mkdir_with_parents instead of mkdir.

Description of the Change

This will at least remove the warning:

** (gdk-pixbuf-thumbnailer:22066): WARNING **: Couldn't save the thumbnail '/home/buildd/.local/share/previews/6081422487475872612.png' for file 'file:///<<BUILDDIR>>/unity-7.5.0+17.10.20170425.1/resources/switcher_background.png': Failed to open '/home/buildd/.local/share/previews/6081422487475872612.png' for writing: No such file or directory

To post a comment you must log in.
Marco Trevisan (Treviño) (3v1n0) wrote :

Ack

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unity-shared/ThumbnailGenerator.cpp'
2--- unity-shared/ThumbnailGenerator.cpp 2013-11-14 03:00:29 +0000
3+++ unity-shared/ThumbnailGenerator.cpp 2017-06-07 15:18:11 +0000
4@@ -492,7 +492,7 @@
5 return "";
6 }
7
8- mkdir(get_preview_dir().c_str(), S_IRWXU);
9+ g_mkdir_with_parents(get_preview_dir().c_str(), S_IRWXU);
10
11 std::string file_type = g_file_info_get_attribute_string(file_info, G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE);
12