From b233c145fa28f2a9e90a40993bc35f408d256e08 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 25 Jul 2010 13:18:57 +0200 Subject: {queue,song}_print: print relative paths if possible 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. --- src/mapper.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mapper.h') diff --git a/src/mapper.h b/src/mapper.h index 3575a0e9d..9f84f96fe 100644 --- a/src/mapper.h +++ b/src/mapper.h @@ -41,6 +41,14 @@ void mapper_finish(void); bool mapper_has_music_directory(void); +/** + * If the specified absolute path points inside the music directory, + * this function converts it to a relative path. If not, it returns + * the unmodified string pointer. + */ +const char * +map_to_relative_path(const char *path_utf8); + /** * Determines the absolute file system path of a relative URI. This * is basically done by converting the URI to the file system charset -- cgit v1.2.3