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 741317 - miner-fs: use GFile to check for homedir
miner-fs: use GFile to check for homedir
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: Miners
unspecified
Other All
: Normal normal
: ---
Assigned To: tracker-general
Depends on:
Blocks:
 
 
Reported: 2014-12-10 02:10 UTC by Cosimo Cecchi
Modified: 2014-12-10 17:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
miner-fs: use GFile to check for homedir (1.32 KB, patch)
2014-12-10 02:10 UTC, Cosimo Cecchi
committed Details | Review

Description Cosimo Cecchi 2014-12-10 02:10:13 UTC
See attached patch.
Comment 1 Cosimo Cecchi 2014-12-10 02:10:14 UTC
Created attachment 292417 [details] [review]
miner-fs: use GFile to check for homedir

Instead of a simple path comparison. This will work with relative paths,
double slashes and similar scenarios, since the path will be
fully-canonicalized by GIO before comparison.
The price to pay is recursively indexing the home directory, so we'd
better be extra careful...
Comment 2 Martyn Russell 2014-12-10 09:16:25 UTC
Comment on attachment 292417 [details] [review]
miner-fs: use GFile to check for homedir

Hi Cosimo, interesting patch. I didn't think the g_get_user_special_dir() returned values would be anything but full paths when writing the code. Based on your points, the patch makes sense.
Thanks again :)
Comment 3 Cosimo Cecchi 2014-12-10 17:10:45 UTC
Thanks for the quick review.

Attachment 292417 [details] pushed as 5f06c13 - miner-fs: use GFile to check for homedir