db/simple/Song: use PathTraitsUTF8::Build()
This commit is contained in:
@ -22,6 +22,7 @@
|
|||||||
#include "tag/Tag.hxx"
|
#include "tag/Tag.hxx"
|
||||||
#include "song/DetachedSong.hxx"
|
#include "song/DetachedSong.hxx"
|
||||||
#include "song/LightSong.hxx"
|
#include "song/LightSong.hxx"
|
||||||
|
#include "fs/Traits.hxx"
|
||||||
#include "util/StringView.hxx"
|
#include "util/StringView.hxx"
|
||||||
|
|
||||||
inline
|
inline
|
||||||
@ -60,13 +61,7 @@ Song::GetURI() const noexcept
|
|||||||
return uri;
|
return uri;
|
||||||
else {
|
else {
|
||||||
const char *path = parent.GetPath();
|
const char *path = parent.GetPath();
|
||||||
|
return PathTraitsUTF8::Build(path, uri.c_str());
|
||||||
std::string result;
|
|
||||||
result.reserve(strlen(path) + 1 + uri.length());
|
|
||||||
result.assign(path);
|
|
||||||
result.push_back('/');
|
|
||||||
result.append(uri);
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user