aboutsummaryrefslogtreecommitdiff
path: root/src/mapper.c
Commit message (Collapse)AuthorAge
* mapper: fix potential crash in file permission checkMax Kellermann2012-08-15
|
* mapper: fix non-UTF8 music directory nameMax Kellermann2012-08-14
| | | | | | Duplicate the music_dir variable: one encoded in UTF-8, and another one using the configured filesystem character set. This fixes an ancient MPD bug.
* mapper: add mapper_get_music_directory()Max Kellermann2012-02-13
| | | | Shortcut for map_directory_fs(db_get_root()).
* Merge branch 'v0.16.x'Max Kellermann2011-11-28
|\ | | | | | | | | | | | | | | | | | | Conflicts: Makefile.am NEWS configure.ac src/encoder/flac_encoder.c src/log.c src/pcm_buffer.c
| * mapper: check "r" permission on music directoryMax Kellermann2011-11-28
| | | | | | | | Yet another common support case.
| * mapper: check "x" permission on music directoryMax Kellermann2011-11-28
| | | | | | | | | | This is a common support case, and hopefully, the new error message will allow the user to understand the error without requiring support.
| * mapper: fix the bogus "not a directory" error messageMax Kellermann2011-11-28
| | | | | | | | | | Use stat() instead of g_file_test() to detect other types of errors, such as "permission denied".
| * mapper: move code to check_directory()Max Kellermann2011-11-28
| |
* | copyright year 2011Max Kellermann2011-01-29
|/
* {queue,song}_print: print relative paths if possibleMax Kellermann2010-07-25
| | | | | | If a song with an absolute path points inside the music directory, print only the relative part. This happens when partial songs from a playlist file were loaded.
* Update copyright notices.Avuton Olrich2009-12-31
|
* Merge branch 'v0.15.x'Max Kellermann2009-12-14
|\ | | | | | | | | Conflicts: src/decoder/ffmpeg_plugin.c
| * mapper: apply filesystem_charset to playlistsMax Kellermann2009-12-08
| | | | | | | | | | | | | | | | This fixes an inconsistency in the stored playlist subsystem: when obtaining the list of playlists (listplaylist, listplaylistinfo), the file names in the playlist directory are converted to UTF-8 (according to filesystem_charset), but when saving or loading playlists, the filesystem_charset setting was ignored.
| * mapper: fix memory leak when playlist_directory is not setMax Kellermann2009-12-08
| | | | | | | | Don't allocate the file name before the playlist_dir==NULL check.
* | include config.h in all sourcesMax Kellermann2009-11-12
| | | | | | | | | | | | After we've been hit by Large File Support problems several times in the past week (which only occur on 32 bit platforms, which I don't have), this is yet another attempt to fix the issue.
* | mapper, update, ...: use g_build_filename(), G_DIR_SEPARATOR, ...Max Kellermann2009-10-20
| | | | | | | | | | Try to be as portable as possible, use GLib path name functions and macros.
* | song: renamed attribute "url" to "uri"Max Kellermann2009-10-13
| |
* | mapper: use g_file_test() instead of stat()Max Kellermann2009-07-15
| | | | | | | | The GLib functions are more portable.
* | mapper: pass music and playlist directory to mapper_init()Max Kellermann2009-07-15
|/ | | | Added another glue function in main().
* all: Update copyright header.Avuton Olrich2009-03-13
| | | | | | | | This updates the copyright header to all be the same, which is pretty much an update of where to mail request for a copy of the GPL and the years of the MPD project. This also puts all committers under 'The Music Player Project' umbrella. These entries should go individually in the AUTHORS file, for consistancy.
* use GLIB_CHECK_VERSION()Max Kellermann2009-03-01
| | | | | Use GLIB_CHECK_VERSION() instead of manually checking GLIB_MAJOR_VERSION, ...
* mapper: ignore duplicate slashes in playlistsMax Kellermann2009-01-30
| | | | | | | | | | | | | | When there are duplicate slashes in the song paths, eliminate them; example: /var/lib/mpd/music//foo.mp3 becomes: /var/lib/mpd/music/foo.mp3 The slash is only detected at the border between the music_directory and the local part.
* mapper: remove trailing slashes from music_directoryMax Kellermann2009-01-30
| | | | | | When the user configures a music_directory with a trailing slash, it may break playlist loading, because MPD expects a double slash. Chop off the trailing slash.
* mapper: added dot to PLAYLIST_FILE_SUFFIXMax Kellermann2009-01-25
| | | | | Some code will be a little bit simpler if the dot is part of the string literal.
* conf: removed parseConfigFilePath()Max Kellermann2009-01-18
| | | | Use config_get_path() instead in mapper.c.
* mapper: make the music_directory optionalMax Kellermann2009-01-18
| | | | Without a music_directory, MPD is an excellent streaming client.
* mapper: make the playlist directory optionalMax Kellermann2009-01-18
|
* conf: no CamelCase, part IMax Kellermann2009-01-17
| | | | Renamed functions, types, variables.
* mapper: check if g_get_user_special_dir() is supported by GLibMax Kellermann2009-01-15
| | | | | g_get_user_special_dir() was introduced with GLib 2.14. Don't use it in older versions.
* mapper: use directory_is_root() instead of isRootDirectory()Max Kellermann2009-01-08
|
* path: allocate buffer in fs_charset conversion functionsMax Kellermann2009-01-08
| | | | | Don't use fixed static buffers. GLib allocates a new string for us anyway, let's just return this one instead of copying it.
* mapper: re-add character set conversion in map_uri_fs()Stepan Pologov2009-01-08
|
* mapper: don't allocate music_dir twiceMax Kellermann2009-01-07
|
* mapper: allocate the result of map_fs_to_utf8()Max Kellermann2009-01-04
|
* mapper: allocate the result of map_directory_child_fs(), map_song_fs()Max Kellermann2009-01-02
| | | | Don't use fixed stack buffers.
* mapper: allocate the result of map_uri_fs(), map_directory_fs()Max Kellermann2009-01-02
| | | | Don't use fixed stack buffers.
* mapper: allocate playlist path from heapMax Kellermann2009-01-01
| | | | Don't pass a static buffer to map_spl_utf8_to_fs().
* mapper: fall back to XDG music directoryMax Kellermann2009-01-01
| | | | | | 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-29
| | | | | 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-24
| | | | | | | | 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-20
| | | | | | 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-31
| | | | | | 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-31
| | | | | Added the function map_spl_utf8_to_fs() which replaces utf8_to_fs_playlist_path().
* mapper: use g_warning() for loggingMax Kellermann2008-10-31
| | | | | 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-19
| | | | | 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-15
| | | | | 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-15
| | | | | Moved the musicDir variable and its initialization code from path.c to mapper.c.
* mapper: new song-to-filesystem mapper libraryMax Kellermann2008-10-14
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.