Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
37ec29b2
Commit
37ec29b2
authored
Feb 07, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mapper: remove unused function map_song_fs()
parent
ca7f6a26
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
86 deletions
+0
-86
Mapper.cxx
src/Mapper.cxx
+0
-67
Mapper.hxx
src/Mapper.hxx
+0
-19
No files found.
src/Mapper.cxx
View file @
37ec29b2
...
@@ -193,73 +193,6 @@ map_uri_fs(const char *uri)
...
@@ -193,73 +193,6 @@ map_uri_fs(const char *uri)
return
AllocatedPath
::
Build
(
music_dir_fs
,
uri_fs
);
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
std
::
string
map_fs_to_utf8
(
const
char
*
path_fs
)
map_fs_to_utf8
(
const
char
*
path_fs
)
{
{
...
...
src/Mapper.hxx
View file @
37ec29b2
...
@@ -92,25 +92,6 @@ AllocatedPath
...
@@ -92,25 +92,6 @@ AllocatedPath
map_uri_fs
(
const
char
*
uri
);
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
* Maps a file system path (relative to the music directory or
* absolute) to a relative path in UTF-8 encoding.
* absolute) to a relative path in UTF-8 encoding.
*
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment