GNOME Bugzilla – Bug 746437
find_member cant find files if directory is "." that is current directory
Last modified: 2015-07-12 13:52:13 UTC
Suppose you want to find file "./something". find_member function in tracker_gsf file thinks "." as a directory and calls gsf_infile_child_by_name with directory as "." gsf_infile_child_by_name unfortunately doesn't recognize "." as current directory and returns NULL
Created attachment 299794 [details] [review] Fix for find_member function
Review of attachment 299794 [details] [review]: Hmm looks right, though I would probably not call the function again, causing an additional malloc, but fix the dirname allocation. Also, don't forget the coding style please ;) https://wiki.gnome.org/Projects/Tracker/Documentation/CodingStyle
*** Bug 730085 has been marked as a duplicate of this bug. ***
Created attachment 300026 [details] [review] Fix for find_member function
Created attachment 300027 [details] [review] Fix for find_member function
Thanks for review. I am attaching two patches. The one which calls the function again, other which fixes dirname allocation. Both works fine. Select whichever you feel appropriate.
Review of attachment 300026 [details] [review]: Using other patch :)
Review of attachment 300027 [details] [review]: Thanks. But, please remember to put the component or binary name as a prefix in commit messages, e.g. "tracker-extract: Fixed foo" :)
Are you going to commit this or shall I?
Hi Martyn, it is already committed. Commit SHA b3ec190d9f4fc1e6194b8d8e319c8846dea7ccc0 https://git.gnome.org/browse/tracker/commit/?id=b3ec190d9f4fc1e6194b8d8e319c8846dea7ccc0