Main: use standard directory API
This commit is contained in:
parent
ae25582178
commit
e42637226f
11
src/Main.cxx
11
src/Main.cxx
@ -50,6 +50,7 @@
|
|||||||
#include "IOThread.hxx"
|
#include "IOThread.hxx"
|
||||||
#include "fs/AllocatedPath.hxx"
|
#include "fs/AllocatedPath.hxx"
|
||||||
#include "fs/Config.hxx"
|
#include "fs/Config.hxx"
|
||||||
|
#include "fs/StandardDirectory.hxx"
|
||||||
#include "PlaylistRegistry.hxx"
|
#include "PlaylistRegistry.hxx"
|
||||||
#include "ZeroconfGlue.hxx"
|
#include "ZeroconfGlue.hxx"
|
||||||
#include "DecoderList.hxx"
|
#include "DecoderList.hxx"
|
||||||
@ -132,13 +133,9 @@ glue_mapper_init(Error &error)
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (music_dir.IsNull()) {
|
if (music_dir.IsNull()) {
|
||||||
const char *path =
|
music_dir = GetUserMusicDir();
|
||||||
g_get_user_special_dir(G_USER_DIRECTORY_MUSIC);
|
if (music_dir.IsNull())
|
||||||
if (path != nullptr) {
|
return false;
|
||||||
music_dir = AllocatedPath::FromUTF8(path, error);
|
|
||||||
if (music_dir.IsNull())
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mapper_init(std::move(music_dir), std::move(playlist_dir));
|
mapper_init(std::move(music_dir), std::move(playlist_dir));
|
||||||
|
Loading…
Reference in New Issue
Block a user