aboutsummaryrefslogtreecommitdiff
path: root/zenserver/zenserver.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-04-21 09:53:53 +0200
committerGitHub <[email protected]>2023-04-21 09:53:53 +0200
commitb6a17ff67f938127865a6e43e0373e5a314e4402 (patch)
tree492b11d158161efa0fe0cdacc3cb6484b7d427ff /zenserver/zenserver.cpp
parentoplog and cache stats (#244) (diff)
downloadzen-b6a17ff67f938127865a6e43e0373e5a314e4402.tar.xz
zen-b6a17ff67f938127865a6e43e0373e5a314e4402.zip
Fix sentry init (#250)
* Sentry does not like UNC paths. Strip them before passing them to sentry * changelog
Diffstat (limited to 'zenserver/zenserver.cpp')
-rw-r--r--zenserver/zenserver.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp
index 749f762f0..f4fd130b1 100644
--- a/zenserver/zenserver.cpp
+++ b/zenserver/zenserver.cpp
@@ -921,9 +921,18 @@ ZenEntryPoint::Run()
{
sentry_options_t* SentryOptions = sentry_options_new();
sentry_options_set_dsn(SentryOptions, "https://[email protected]/5919284");
+ if (SentryDatabasePath.starts_with("\\\\?\\"))
+ {
+ SentryDatabasePath = SentryDatabasePath.substr(4);
+ }
sentry_options_set_database_path(SentryOptions, SentryDatabasePath.c_str());
sentry_options_set_logger(SentryOptions, SentryLogFunction, this);
- sentry_options_add_attachment(SentryOptions, m_ServerOptions.AbsLogFile.string().c_str());
+ std::string SentryAttachmentPath = m_ServerOptions.AbsLogFile.string();
+ if (SentryAttachmentPath.starts_with("\\\\?\\"))
+ {
+ SentryAttachmentPath = SentryAttachmentPath.substr(4);
+ }
+ sentry_options_add_attachment(SentryOptions, SentryAttachmentPath.c_str());
sentry_options_set_release(SentryOptions, ZEN_CFG_VERSION);
// sentry_options_set_debug(SentryOptions, 1);