aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapper.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* mapper: allocate the result of map_fs_to_utf8()Max Kellermann2009-01-041-3/+5
|
* mapper: allocate the result of map_directory_child_fs(), map_song_fs()Max Kellermann2009-01-021-11/+12
| | | | Don't use fixed stack buffers.
* mapper: allocate the result of map_uri_fs(), map_directory_fs()Max Kellermann2009-01-021-19/+10
| | | | Don't use fixed stack buffers.
* mapper: allocate playlist path from heapMax Kellermann2009-01-011-12/+9
| | | | Don't pass a static buffer to map_spl_utf8_to_fs().
* mapper: fall back to XDG music directoryMax Kellermann2009-01-011-1/+11
| | | | | | If no music_directory is configured, fall back to the XDG music directory, determined by g_get_user_special_dir(G_USER_DIRECTORY_MUSIC).
* removed os_compat.hMax Kellermann2008-12-291-1/+5
| | | | | Only include headers which are really needed. os_compat.h aimed to make MPD easily portable, but was never actually made portable.
* playlist: fix stored playlist modifications with absolute pathsMax Kellermann2008-12-241-1/+11
| | | | | | | | When save_absolute_paths_in_playlists was enabled in mpd.conf, MPD broke all playlists when manipulated using the "playlistdelete" command. The reason was that map_directory_child_fs() was used, which doesn't accept slashes in the file name. Use the new map_uri_fs() function instead.
* mapper: use the utf8_to_fs_charset() resultKonstantin Sobolev2008-11-201-1/+1
| | | | | | In map_directory_child_fs(), the result of utf8_to_fs_charset() was never used, because it passed the unmodified "name" parameter to pfx_dir().
* mapper: check for "." and ".."Max Kellermann2008-10-311-0/+5
| | | | | | Make map_directory_child_fs() refuse the names "." and "..". This is currently the interface where an attacker may inject a manipulated path (through the "update" command).
* path: moved playlist_dir to mapper.cMax Kellermann2008-10-311-0/+38
| | | | | Added the function map_spl_utf8_to_fs() which replaces utf8_to_fs_playlist_path().
* mapper: use g_warning() for loggingMax Kellermann2008-10-311-5/+5
| | | | | g_error() is fatal by default. Use g_warning() for non-fatal initialization errors.
* mapper: don't return database path with leading slashMax Kellermann2008-10-191-1/+1
| | | | | Due to an off-by-one bug in map_fs_to_utf8(), the function returned database paths with a leading slash.
* playlist: added support for adding songs not in the music databaseMax Kellermann2008-10-151-2/+5
| | | | | Clients which have authenticated via unix socket may add local files to the MPD playlist, provided that they own the file.
* mapper: moved musicDir initialization from path.cMax Kellermann2008-10-151-6/+45
| | | | | Moved the musicDir variable and its initialization code from path.c to mapper.c.
* mapper: new song-to-filesystem mapper libraryMax Kellermann2008-10-141-0/+77
The mapper library maps directory and song objects to file system paths. With this central library, the code mixture in path.c should be cleaned up, and we will be able to add neat features like aliasing.