aboutsummaryrefslogtreecommitdiffstats
path: root/src/directory_save.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Avoid calling isRootDirectory when we have a directory objectEric Wong2008-10-121-2/+2
| | | | | There is only one music_root and we can just compare addresses.
* directory: don't use identical struct and variable namesEric Wong2008-10-111-15/+15
| | | | | | Duplicated tokens in close proximity takes too long for my head to parse; and "dir" is an easy and common abbreviation for "directory".
* directory: don't query database during loadMax Kellermann2008-10-111-2/+1
| | | | | | 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-111-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.
* diretory: moved code to directory_save.c, directory_print.cMax Kellermann2008-10-111-0/+117
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.