aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Mapper.cxx67
-rw-r--r--src/Mapper.hxx19
2 files changed, 0 insertions, 86 deletions
diff --git a/src/Mapper.cxx b/src/Mapper.cxx
index 4e7efff67..5a02096e8 100644
--- a/src/Mapper.cxx
+++ b/src/Mapper.cxx
@@ -193,73 +193,6 @@ map_uri_fs(const char *uri)
return AllocatedPath::Build(music_dir_fs, uri_fs);
}
-gcc_pure
-static AllocatedPath
-map_directory_fs(const Directory &directory)
-{
- assert(!music_dir_fs.IsNull());
-
- if (directory.IsRoot())
- return music_dir_fs;
-
- return map_uri_fs(directory.GetPath());
-}
-
-/**
- * Determines the file system path of a directory's child (may be a
- * sub directory or a song).
- *
- * @param directory the parent directory object
- * @param name the child's name in UTF-8
- * @return the path in file system encoding, or nullptr if mapping failed
- */
-static AllocatedPath
-map_directory_child_fs(const Directory &directory, const char *name)
-{
- assert(!music_dir_fs.IsNull());
-
- /* check for invalid or unauthorized base names */
- if (*name == 0 || strchr(name, '/') != nullptr ||
- strcmp(name, ".") == 0 || strcmp(name, "..") == 0)
- return AllocatedPath::Null();
-
- const auto parent_fs = map_directory_fs(directory);
- if (parent_fs.IsNull())
- return AllocatedPath::Null();
-
- const auto name_fs = AllocatedPath::FromUTF8(name);
- if (name_fs.IsNull())
- return AllocatedPath::Null();
-
- return AllocatedPath::Build(parent_fs, name_fs);
-}
-
-AllocatedPath
-map_song_fs(const Song &song)
-{
- assert(song.parent != nullptr);
-
- return map_directory_child_fs(*song.parent, song.uri);
-}
-
-#endif
-
-AllocatedPath
-map_song_fs(const DetachedSong &song)
-{
- if (song.IsAbsoluteFile())
- return AllocatedPath::FromUTF8(song.GetRealURI());
- else {
-#ifdef ENABLE_DATABASE
- return map_uri_fs(song.GetURI());
-#else
- return AllocatedPath::Null();
-#endif
- }
-}
-
-#ifdef ENABLE_DATABASE
-
std::string
map_fs_to_utf8(const char *path_fs)
{
diff --git a/src/Mapper.hxx b/src/Mapper.hxx
index 3ddee5568..a9551c929 100644
--- a/src/Mapper.hxx
+++ b/src/Mapper.hxx
@@ -92,25 +92,6 @@ AllocatedPath
map_uri_fs(const char *uri);
/**
- * Determines the file system path of a song. This must not be a
- * remote song.
- *
- * @param song the song object
- * @return the path in file system encoding, or nullptr if mapping failed
- */
-gcc_pure
-AllocatedPath
-map_song_fs(const Song &song);
-
-#endif
-
-gcc_pure
-AllocatedPath
-map_song_fs(const DetachedSong &song);
-
-#ifdef ENABLE_DATABASE
-
-/**
* Maps a file system path (relative to the music directory or
* absolute) to a relative path in UTF-8 encoding.
*