aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory_save.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* directory: added "mtime" propertyMax Kellermann2009-02-281-2/+9
| | | | | | Remember the modification time of each directory. This is important for archives (which are virtual directories right now), but may also be useful for an automatic update mechanism.
* directory: moved DIRECTORY_* string constantsMax Kellermann2009-02-271-0/+4
| | | | Moved some of them to to directory_save.c, and others to database.c.
* directory: added directory_is_root()Max Kellermann2009-01-041-2/+2
| | | | | directory_is_root() is cheaper than isRootDirectory(directory_get_path()).
* don't include utils.h when it isn't usedMax Kellermann2009-01-031-1/+0
|
* removed os_compat.hMax Kellermann2008-12-291-0/+3
| | | | | Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
* utils: removed myFgets()Max Kellermann2008-12-281-4/+6
| | | | Replaced myFgets() with fgets() + g_strchomp().
* utils: use g_str_has_prefix() instead of prefixcmp()Max Kellermann2008-10-281-6/+6
| | | | Remove duplicated code from MPD.
* path: replaced mpd_basename() with g_path_get_basename()Max Kellermann2008-10-201-1/+4
| | | | | | GLib's g_path_get_basename() is much more reliable than mpd_basename(). The latter could be tricked into an assertion failure.
* directory: don't query database during loadMax Kellermann2008-10-091-2/+2
| | | | | | Don't use db_get_directory() and traverse the full path with every directory being loaded. Just see if the current parent contains the entry. Everything else would be invalid anyway..
* directory: check the absolute path of a subdirectory while loadingMax Kellermann2008-10-091-0/+4
| | | | | | | A manipulated database could trigger an assertion failure, because the parent didn't match. Do a proper check if the new directory is within the parent's. This uses FATAL() to bail out, so MPD still dies, but it doesn't crash.
* directory: moved dirvec struct declaration to dirvec.hMax Kellermann2008-10-091-1/+0
| | | | | No idea why it was created in directory.h, but it should be in dirvec.h.
* diretory: moved code to directory_save.c, directory_print.cMax Kellermann2008-10-091-0/+101
Remove clutter from directory.c. Everything which saves or loads to/from the hard disk goes to directory_save.c, and code which sends directory information to the client is moved into directory_print.c.