• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mbits-os / quick_dra / 27128064936

08 Jun 2026 09:21AM UTC coverage: 99.944% (-0.06%) from 100.0%
27128064936

Pull #68

github

web-flow
Merge 253ff2666 into 86b6939fb
Pull Request #68: fix: don't use `decltype` on lambda in template base classes

6 of 8 new or added lines in 2 files covered. (75.0%)

3598 of 3600 relevant lines covered (99.94%)

697.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.83
/libs/libbase/src/base/paths.cpp
1
// Copyright (c) 2026 midnightBITS
2
// This code is licensed under MIT license (see LICENSE for details)
3

4
#include <quick_dra/base/paths.hpp>
5

6
namespace quick_dra::platform {
7
        namespace {
8
                std::filesystem::path& _config_data_dir() {
44✔
9
                        static auto path = exec_dir().parent_path() / dir_names::config;
44✔
10
                        return path;
44✔
11
                }
12

13
                std::filesystem::path _home_path() {
10✔
14
                        auto const* const HOME = std::getenv("HOME");
10✔
15
                        if (HOME) {
10✔
16
                                return HOME;
4✔
17
                        }
18
                        auto const* const USERPROFILE = std::getenv("USERPROFILE");
6✔
19
                        if (USERPROFILE) {
6✔
20
                                return USERPROFILE;
2✔
21
                        }
22

23
                        std::filesystem::path result{};
4✔
24

25
                        auto const* const HOMEDRIVE = std::getenv("HOMEDRIVE");
4✔
26
                        auto const* HOMEPATH = std::getenv("HOMEPATH");
4✔
27
                        if (HOMEDRIVE) {
4✔
28
                                result = HOMEDRIVE;
4✔
29
                        }
30
                        if (!HOMEPATH) HOMEPATH = "";
4✔
31
                        result /= HOMEPATH;
4✔
32

33
                        return result;
4✔
34
                }
4✔
35
        }  // namespace
36

37
        std::filesystem::path const& config_data_dir() { return _config_data_dir(); }
44✔
NEW
38
        void config_data_dir(std::filesystem::path const& new_value) { _config_data_dir() = new_value; }
×
39

40
        std::filesystem::path const& home_path() {
10✔
41
                static auto const path = _home_path();
10✔
42
                return path;
10✔
43
        }
44
}  // namespace quick_dra::platform
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc