db/Configured: use GetAppCacheDir() instead of GetUserCacheDir()
This commit is contained in:
parent
cfd4d5b13e
commit
5d2e80f188
2
NEWS
2
NEWS
@ -1,4 +1,6 @@
|
|||||||
ver 0.23.11 (not yet released)
|
ver 0.23.11 (not yet released)
|
||||||
|
* database
|
||||||
|
- simple: move default database to ~/.cache/mpd/db from ~/.cache/mpd.db
|
||||||
* macOS: fix build failure "no archive members specified"
|
* macOS: fix build failure "no archive members specified"
|
||||||
* Windows
|
* Windows
|
||||||
- fix crash bug (stack buffer overflow) after I/O errors
|
- fix crash bug (stack buffer overflow) after I/O errors
|
||||||
|
@ -51,11 +51,11 @@ CreateConfiguredDatabase(const ConfigData &config,
|
|||||||
} else {
|
} else {
|
||||||
/* if there is no override, use the cache directory */
|
/* if there is no override, use the cache directory */
|
||||||
|
|
||||||
const AllocatedPath cache_dir = GetUserCacheDir();
|
const AllocatedPath cache_dir = GetAppCacheDir();
|
||||||
if (cache_dir.IsNull())
|
if (cache_dir.IsNull())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
const auto db_file = cache_dir / Path::FromFS(PATH_LITERAL("mpd.db"));
|
const auto db_file = cache_dir / Path::FromFS(PATH_LITERAL("db"));
|
||||||
auto db_file_utf8 = db_file.ToUTF8();
|
auto db_file_utf8 = db_file.ToUTF8();
|
||||||
if (db_file_utf8.empty())
|
if (db_file_utf8.empty())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user