After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 746437 - find_member cant find files if directory is "." that is current directory
find_member cant find files if directory is "." that is current directory
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Extractor
git master
Other Linux
: Normal normal
: ---
Assigned To: tracker-extractor
tracker-extractor
: 730085 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-03-19 10:11 UTC by Kunaal Jain
Modified: 2015-07-12 13:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for find_member function (1.18 KB, patch)
2015-03-19 10:34 UTC, Kunaal Jain
none Details | Review
Fix for find_member function (1.30 KB, patch)
2015-03-21 15:33 UTC, Kunaal Jain
rejected Details | Review
Fix for find_member function (1.18 KB, patch)
2015-03-21 15:34 UTC, Kunaal Jain
committed Details | Review

Description Kunaal Jain 2015-03-19 10:11:35 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
Comment 1 Kunaal Jain 2015-03-19 10:34:01 UTC
Created attachment 299794 [details] [review]
Fix for find_member function
Comment 2 Martyn Russell 2015-03-20 20:12:57 UTC
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
Comment 3 Martyn Russell 2015-03-20 20:35:57 UTC
*** Bug 730085 has been marked as a duplicate of this bug. ***
Comment 4 Kunaal Jain 2015-03-21 15:33:50 UTC
Created attachment 300026 [details] [review]
Fix for find_member function
Comment 5 Kunaal Jain 2015-03-21 15:34:10 UTC
Created attachment 300027 [details] [review]
Fix for find_member function
Comment 6 Kunaal Jain 2015-03-21 15:34:52 UTC
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.
Comment 7 Martyn Russell 2015-03-23 22:43:59 UTC
Review of attachment 300026 [details] [review]:

Using other patch :)
Comment 8 Martyn Russell 2015-03-23 22:44:28 UTC
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" :)
Comment 9 Martyn Russell 2015-07-12 11:53:07 UTC
Are you going to commit this or shall I?
Comment 10 Kunaal Jain 2015-07-12 13:52:13 UTC
Hi Martyn, it is already committed. 
Commit SHA b3ec190d9f4fc1e6194b8d8e319c8846dea7ccc0
https://git.gnome.org/browse/tracker/commit/?id=b3ec190d9f4fc1e6194b8d8e319c8846dea7ccc0