GNOME Bugzilla – Bug 677025
Some issues in get_file_content_as_base64()
Last modified: 2012-06-14 11:44:06 UTC
Created attachment 215172 [details] [review] Add ephy_file_create_data_uri_for_filename() The image content type is a const string owned by GFileInfo, that is used after file_info is freed. The name of the function is a bit confusing, because it doesn't just encode the file contents as base64, it also builds and returns a data URI. Name variables assume the file is an image, but the function could be used with any file. The code is duplicated in aboput:applications handler, so I think we could move the function to ephy-file-helpers and use it from both error pages and applications handler.
Since you are fixing several issues here, wouldn't it make sense to split the patch in several ones?
I'm fixing several issues, but using a new method that fixes all of them, so I'm not sure.
*** Bug 677736 has been marked as a duplicate of this bug. ***
I'm inclined to let Dan's patch in 677736 in first and then we can apply your refactorings. What do you think?
Ok.
Ok, I pushed it!
Review of attachment 215172 [details] [review]: Cool stuff!