diff options
| author | Stefan Boberg <[email protected]> | 2026-04-23 18:16:57 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2026-04-23 18:16:57 +0200 |
| commit | 0232b991cd7d8e3a2114ea30e4591dd3e7b65c36 (patch) | |
| tree | 94730e7594fd09ae1fa820391ce311f6daf13905 /src/zencore/sentryintegration.cpp | |
| parent | Fix forward declaration order for s_GotSigWinch and SigWinchHandler (diff) | |
| parent | trace: declare Region event name fields as AnsiString (#1012) (diff) | |
| download | archived-zen-sb/zen-help.tar.xz archived-zen-sb/zen-help.zip | |
Merge branch 'main' into sb/zen-helpsb/zen-help
- Combine HelpCommand (this branch) with HistoryCommand (main) in zen CLI dispatcher
- Keep filter-aware TuiPickOne rewrite; adopt main's ASCII arrow glyphs in doc comment
Diffstat (limited to 'src/zencore/sentryintegration.cpp')
| -rw-r--r-- | src/zencore/sentryintegration.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/zencore/sentryintegration.cpp b/src/zencore/sentryintegration.cpp index 8491bef64..61b735594 100644 --- a/src/zencore/sentryintegration.cpp +++ b/src/zencore/sentryintegration.cpp @@ -250,7 +250,7 @@ SentryIntegration::Initialize(const Config& Conf, const std::string& CommandLine if (SentryOptions == nullptr) { - // OOM — skip sentry entirely rather than crashing on the subsequent set calls + // OOM - skip sentry entirely rather than crashing on the subsequent set calls m_SentryErrorCode = -1; m_IsInitialized = true; return; @@ -261,14 +261,23 @@ SentryIntegration::Initialize(const Config& Conf, const std::string& CommandLine sentry_options_set_logger(SentryOptions, SentryLogFunction, this); sentry_options_set_environment(SentryOptions, Conf.Environment.empty() ? "production" : Conf.Environment.c_str()); - std::string SentryAttachmentsPath = Conf.AttachmentsPath; - if (!SentryAttachmentsPath.empty()) + for (const std::filesystem::path& AttachmentPath : Conf.AttachmentPaths) { - if (SentryAttachmentsPath.starts_with("\\\\?\\")) + if (AttachmentPath.empty()) { - SentryAttachmentsPath = SentryAttachmentsPath.substr(4); + continue; } - sentry_options_add_attachment(SentryOptions, SentryAttachmentsPath.c_str()); +# if ZEN_PLATFORM_WINDOWS + const std::wstring Wide = AttachmentPath.wstring(); + const wchar_t* WPath = Wide.c_str(); + if (Wide.starts_with(L"\\\\?\\")) + { + WPath += 4; + } + sentry_options_add_attachmentw(SentryOptions, WPath); +# else + sentry_options_add_attachment(SentryOptions, AttachmentPath.string().c_str()); +# endif } sentry_options_set_release(SentryOptions, ZEN_CFG_VERSION); |