updates and fixes
This commit is contained in:
parent
6dd18ac26e
commit
7fa06ae18c
4 changed files with 14 additions and 13 deletions
|
@ -33,16 +33,16 @@ namespace {
|
|||
possiblePaths.push_back(fs::path(".") / "config.toml");
|
||||
#else
|
||||
// Unix/Linux paths in order of preference
|
||||
if (auto result = getEnv("XDG_CONFIG_HOME"); result)
|
||||
possiblePaths.push_back(fs::path(*result) / "draconis++" / "config.toml");
|
||||
if (auto result = GetEnv("XDG_CONFIG_HOME"); result)
|
||||
possiblePaths.emplace_back(fs::path(*result) / "draconis++" / "config.toml");
|
||||
|
||||
if (auto result = getEnv("HOME"); result) {
|
||||
possiblePaths.push_back(fs::path(*result) / ".config" / "draconis++" / "config.toml");
|
||||
possiblePaths.push_back(fs::path(*result) / ".draconis++" / "config.toml");
|
||||
if (auto result = GetEnv("HOME"); result) {
|
||||
possiblePaths.emplace_back(fs::path(*result) / ".config" / "draconis++" / "config.toml");
|
||||
possiblePaths.emplace_back(fs::path(*result) / ".draconis++" / "config.toml");
|
||||
}
|
||||
|
||||
// System-wide config
|
||||
possiblePaths.push_back(fs::path("/etc/draconis++/config.toml"));
|
||||
possiblePaths.emplace_back("/etc/draconis++/config.toml");
|
||||
#endif
|
||||
|
||||
// Check if any of these configs already exist
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#include <fmt/color.h>
|
||||
#include <fmt/format.h>
|
||||
#include <source_location>
|
||||
#include <utility>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
#include <string>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <expected>
|
||||
// ReSharper disable once CppUnusedIncludeDirective
|
||||
#include <guiddef.h>
|
||||
#include <variant>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue