diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-09-29 03:05:14 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-09-29 03:05:14 -0700 |
commit | c4772b46eedc41cbe40678be1c02f31d24117b5e (patch) | |
tree | a43100a40f5f30d95dabacd98a9e372930b5bc5e /src/path.h | |
parent | 1e36728aedede8f521b622ef32ca102e79cb61f6 (diff) | |
parent | dde461fe6e012a62ee47cf5f3bfc022b650b6bf5 (diff) | |
download | mpd-c4772b46eedc41cbe40678be1c02f31d24117b5e.tar.gz mpd-c4772b46eedc41cbe40678be1c02f31d24117b5e.tar.xz mpd-c4772b46eedc41cbe40678be1c02f31d24117b5e.zip |
Merge branch 'ew/directory'
* ew/directory:
directory: remove redundant sanitizePathDup
update: move path sanitation up the stack to avoid extra copies
clean up updateInit calling and error handling
directory: isRootDirectory() is a one-liner
directory: writeDirectoryInfo propagates errors
directory: make it clear that DIRECTORY_MTIME is deprecated
directory: remove "Mp3" references
playlist: deleteASongFromPlaylist takes a const Song *
songvec: songvec_delete takes a const Song pointer
directory: remove shortname arguments everywhere
path: add mpd_basename() function
directory.h: remove directory_sigChldHandler decl
directory: replace DirectoryList with dirvec
directory: remove unused CPP defines
songvec_free => songvec_destroy
directory.c: kill unnecessary includes
Diffstat (limited to 'src/path.h')
-rw-r--r-- | src/path.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/path.h b/src/path.h index a91728126..2c5801528 100644 --- a/src/path.h +++ b/src/path.h @@ -88,4 +88,12 @@ void pathcpy_trunc(char *dest, const char *src); */ void utf8_to_fs_playlist_path(char *path_max_tmp, const char *utf8path); +/* + * Like basename(3) but with predictable semantics independent + * of C library or build options used. This is also much more strict + * and does not account for trailing slashes (mpd should never deal with + * trailing slashes on internal functions). + */ +const char *mpd_basename(const char *path); + #endif |