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 748907 - libtracker-common: Don’t fail statvfs() on a missing directory
libtracker-common: Don’t fail statvfs() on a missing directory
Status: RESOLVED FIXED
Product: tracker
Classification: Core
Component: General
unspecified
Other All
: Normal normal
: ---
Assigned To: tracker-general
tracker-general
Depends on:
Blocks:
 
 
Reported: 2015-05-04 16:40 UTC by Philip Withnall
Modified: 2015-07-03 22:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libtracker-common: Don’t fail statvfs() on a missing directory (2.93 KB, patch)
2015-05-04 16:40 UTC, Philip Withnall
committed Details | Review

Description Philip Withnall 2015-05-04 16:40:18 UTC
Simple patch to handle ENOENT from statvfs() correctly.
Comment 1 Philip Withnall 2015-05-04 16:40:21 UTC
Created attachment 302883 [details] [review]
libtracker-common: Don’t fail statvfs() on a missing directory

If $XDG_CACHE_HOME/tracker doesn’t exist on startup, the statvfs() call
to determine how much space is left will fail with ENOENT. However, the
code currently interprets this as being out of space, and will cause the
rest of Tracker to shut down, even if there is actually plenty of space
left on the disk.

Avoid this by traversing up the directory hierarchy until statvfs() does
not fail with ENOENT.
Comment 2 Martyn Russell 2015-05-31 12:44:52 UTC
Review of attachment 302883 [details] [review]:

Superb patch and nice catch! Thanks Philip :)
Comment 3 Carlos Garnacho 2015-07-03 22:52:14 UTC
The patch seems in, closing.