GNOME Bugzilla – Bug 741162
media-server: Store photo names without extensions
Last modified: 2014-12-16 14:18:23 UTC
The DisplayName property from the media server returns the filename with extensions of photos. We don't need to store extensions of photos in nie:title.
Created attachment 292183 [details] [review] media-server: Store photo names without extensions
Review of attachment 292183 [details] [review]: Thanks for the patch, Pranav. Looks good, apart from a small issue. ::: src/gom-media-server-miner.c @@ +59,1 @@ photo->name = g_strdup (str); This introduces a leak because gom_filename_strip_extension returns a string that the caller needs to g_free. I would suggest directly assigning the returned string to photo->name. ::: src/gom-utils.c @@ +69,3 @@ + return filename; +} + You get bonus points for having taken the implementation from gnome-documents / gnome-photos.
Review of attachment 292183 [details] [review]: ::: src/gom-utils.h @@ +31,3 @@ const gchar *gom_filename_to_rdf_type (const gchar *filename_with_extension); +const gchar *gom_filename_strip_extension (const gchar *filename_with_extension); The return type should not be const because the caller needs to g_free it.
Created attachment 292834 [details] [review] media-server: Store photo names without extensions Fixed the above issues.