summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-desktop-file.c
Commit message (Collapse)AuthorAgeFilesLines
* desktop-file: fix stat() raceLennart Poettering2009-10-171-16/+3
| | | | | | | | | | | | | | _dbus_desktop_file_load() used to stat the desktop file before reading it, to verify its size. This is both racy and unnecessary since _dbus_file_get_contents() which it uses stats the file anyway -- does that however in a race-free fashion with fstat() instead of stat(). This patch gets rid of the redundant stat(). Also, since the desktop file change logic requires the mtime of the file it read we now export that in _dbus_file_get_contents(). This patch probably breaks Win32 builds, but afaik those are broken anyway.
* desktop-file: implement _dbus_desktop_file_changed()Lennart Poettering2009-10-171-0/+14
| | | | | _dbus_desktop_file_changed() can be used if the file changed since it was read. (by comparing the mtime back then and now)
* desktop-file: implement _dbus_desktop_file_get_section()Lennart Poettering2009-10-171-0/+12
| | | | This allows us to iterate through the sections of a desktop file.
* desktop-file: relax validity checks a bitLennart Poettering2009-10-171-3/+5
| | | | | Mnimally change the validity checks for deskto files so that the ConsoleKit database can pass as valid.
* move desktop file parser from bus/ to dbus/Lennart Poettering2009-10-171-0/+799
We want to make use of it for reading the ConsoleKit database which will need to be implemented in dbus/dbus-userdb-util.c, so let's move this to dbus/.