mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
[macOS] store logs in the standard system directory
~/Library/Logs/vcmi
This commit is contained in:
parent
99af5bbe4c
commit
45f5fc04be
@ -368,6 +368,7 @@ class VCMIDirsOSX final : public IVCMIDirsUNIX
|
||||
boost::filesystem::path userDataPath() const override;
|
||||
boost::filesystem::path userCachePath() const override;
|
||||
boost::filesystem::path userConfigPath() const override;
|
||||
boost::filesystem::path userLogsPath() const override;
|
||||
|
||||
std::vector<boost::filesystem::path> dataPaths() const override;
|
||||
|
||||
@ -437,6 +438,14 @@ bfs::path VCMIDirsOSX::userDataPath() const
|
||||
bfs::path VCMIDirsOSX::userCachePath() const { return userDataPath(); }
|
||||
bfs::path VCMIDirsOSX::userConfigPath() const { return userDataPath() / "config"; }
|
||||
|
||||
bfs::path VCMIDirsOSX::userLogsPath() const
|
||||
{
|
||||
// TODO: use proper objc code from Foundation framework
|
||||
if(const auto homeDir = std::getenv("HOME"))
|
||||
return bfs::path{homeDir} / "Library" / "Logs" / "vcmi";
|
||||
return IVCMIDirsUNIX::userLogsPath();
|
||||
}
|
||||
|
||||
std::vector<bfs::path> VCMIDirsOSX::dataPaths() const
|
||||
{
|
||||
std::vector<bfs::path> ret;
|
||||
|
Loading…
Reference in New Issue
Block a user