fs/StandardDirectory: use PACKAGE_NAME from version.h
This commit is contained in:
parent
94f06f0946
commit
1da974e3fa
@ -53,6 +53,12 @@
|
|||||||
#include "Main.hxx"
|
#include "Main.hxx"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USE_XDG
|
||||||
|
#include "Version.h" // for PACKAGE_NAME
|
||||||
|
#define APP_FILENAME PATH_LITERAL(PACKAGE_NAME)
|
||||||
|
static constexpr Path app_filename = Path::FromFS(APP_FILENAME);
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(_WIN32) && !defined(ANDROID)
|
#if !defined(_WIN32) && !defined(ANDROID)
|
||||||
class PasswdEntry
|
class PasswdEntry
|
||||||
{
|
{
|
||||||
@ -307,7 +313,7 @@ GetAppRuntimeDir() noexcept
|
|||||||
|
|
||||||
#ifdef USE_XDG
|
#ifdef USE_XDG
|
||||||
if (const auto user_dir = GetUserRuntimeDir(); !user_dir.IsNull()) {
|
if (const auto user_dir = GetUserRuntimeDir(); !user_dir.IsNull()) {
|
||||||
auto dir = user_dir / Path::FromFS("mpd");
|
auto dir = user_dir / app_filename;
|
||||||
mkdir(dir.c_str(), 0777);
|
mkdir(dir.c_str(), 0777);
|
||||||
return dir;
|
return dir;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user