Merge lp:~jpakkane/thumbnailer/fix-1319698 into lp:thumbnailer/trusty

Proposed by Jussi Pakkanen
Status: Merged
Approved by: Jussi Pakkanen
Approved revision: 14
Merged at revision: 14
Proposed branch: lp:~jpakkane/thumbnailer/fix-1319698
Merge into: lp:thumbnailer/trusty
Diff against target: 27 lines (+11/-0)
2 files modified
.bzr-builddeb/default.conf (+2/-0)
src/imagescaler.cpp (+9/-0)
To merge this branch: bzr merge lp:~jpakkane/thumbnailer/fix-1319698
Reviewer Review Type Date Requested Status
Antti Kaijanmäki (community) Approve
Review via email: mp+248513@code.launchpad.net

Commit message

SRU backport of patch to make file names with chinese characters work.

Description of the change

SRU backport of patch to make file names with chinese characters work.

To post a comment you must log in.
Revision history for this message
Antti Kaijanmäki (kaijanmaki) wrote :

LGTM.

review: Approve
lp:~jpakkane/thumbnailer/fix-1319698 updated
15. By Jussi Pakkanen

Added bzr-builddeb conf file to make this branch citrain ready.

Revision history for this message
Robert Bruce Park (robru) wrote :

lp:thumbnailer/trusty is an alias to lp:~jpakkane/thumbnailer/trusty, which is a privately owned branch (as opposed to team-owned). As a result of this, CI Train is not able to merge this MP for you. The resulting release branch has been pushed to lp:~ci-train-bot/thumbnailer/latestsnapshot-ubuntu-recup which you must now manually merge into lp:thumbnailer/trusty.

If you intend to do future landings with CI Train and lp:thumbnailer/trusty, please change the branch ownership to a team that contains ~ci-train-bot as a member, such as ~unity-team (the same owner as lp:thumbnailer).

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory '.bzr-builddeb'
2=== added file '.bzr-builddeb/default.conf'
3--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
4+++ .bzr-builddeb/default.conf 2015-02-05 11:42:28 +0000
5@@ -0,0 +1,2 @@
6+[BUILDDEB]
7+split = True
8
9=== modified file 'src/imagescaler.cpp'
10--- src/imagescaler.cpp 2014-03-19 20:16:40 +0000
11+++ src/imagescaler.cpp 2015-02-05 11:42:28 +0000
12@@ -137,6 +137,15 @@
13 string mtime_str = to_string(mtime);
14 save_ok = gdk_pixbuf_save(dst.get(), ofilename_tmp.c_str(), "png", &err,
15 "tEXt::Thumb::URI", uri.c_str(), "tEXt::Thumb::MTime", mtime_str.c_str(), NULL);
16+ if(!save_ok) {
17+ // Sigh. PNG text chunks are encoded in ISO-8859-1 but this is impossible if
18+ // the file name contains e.g. Chinese characters. Fall back to writing the
19+ // thumbnail without metadata. This does not conform to the thumbnailing standard
20+ // but at least it will give us a working thumbnail.
21+ g_error_free(err);
22+ err = nullptr;
23+ save_ok = gdk_pixbuf_save(dst.get(), ofilename_tmp.c_str(), "png", &err, NULL);
24+ }
25 }
26 if(!save_ok) {
27 string msg = err->message;

Subscribers

People subscribed via source and target branches

to all changes: