providers: don't fail if the icon already exists, overwrite it instead

This commit is contained in:
Bilal Elmoussaoui 2021-01-31 21:58:19 +01:00
parent 57e5fa9a1d
commit fcd8e42d7c

View file

@ -256,10 +256,12 @@ impl ProviderPage {
let image_dest = FAVICONS_PATH.join(icon_name.as_str());
let dest_file = gio::File::new_for_path(image_dest);
dest_file.create(
dest_file
.create(
gio::FileCreateFlags::REPLACE_DESTINATION,
gio::NONE_CANCELLABLE,
)?;
)
.ok();
file.copy(
&dest_file,
gio::FileCopyFlags::OVERWRITE,