fixed grabing page icon

This commit is contained in:
Artem Anufrij 2018-10-19 22:24:19 +02:00
parent c7d74f21fb
commit 1b1d5fdf35
2 changed files with 8 additions and 1 deletions

View file

@ -43,6 +43,7 @@
<p>Fixed:</p>
<ul>
<li>Restore correct window size</li>
<li>Grabing page icon</li>
</ul>
<p>Translation:</p>
<ul>

View file

@ -490,7 +490,13 @@ namespace Webpin.Widgets.Views {
string icon = icon_name_entry.get_text ();
if (tmp_icon_file != "") {
var new_icon = GLib.Path.build_filename (WebpinApp.instance.CACHE_FOLDER, app_name_entry.get_text () + tmp_icon_ext);
FileUtils.rename (tmp_icon_file, new_icon);
uint8[] content;
try {
FileUtils.get_data (tmp_icon_file, out content);
FileUtils.set_data (new_icon, content);
} catch (Error err) {
warning (err.message);
}
FileUtils.remove (tmp_icon_file);
icon = new_icon;
}