Skip to content

Commit

Permalink
Store sentry logs in correct place
Browse files Browse the repository at this point in the history
By default it stores them in the cwd, which won't work for actual instals.
It now places them in the root Cura folder

CURA-11364
  • Loading branch information
nallath committed Nov 21, 2023
1 parent 10d66c5 commit 02cb17c
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,19 @@ int main(int argc, char** argv)
sentry_options_set_dsn(options, "https://[email protected]/4506257745510401");
// This is also the default-path. For further information and recommendations:
// https://docs.sentry.io/platforms/native/configuration/options/#database-path
sentry_options_set_database_path(options, ".sentry-native");
std::string config_path = "";

#if defined(__linux__)
config_path += getenv("HOME");
config_path += "/.local/share/cura/";
#elif defined(__APPLE__) && defined(__MACH__)
config_path += getenv("HOME");
config_path += "/Library/Application Support/cura/";
#elif defined(_WIN64)
config_path = "%APPDATA%\\cura\\";
#endif
config_path += ".sentry-native";
sentry_options_set_database_path(options, config_path.c_str());
std::string version = "curaengine@";
version += std::string(CURA_ENGINE_VERSION);
sentry_options_set_release(options, version.c_str());
Expand Down

0 comments on commit 02cb17c

Please sign in to comment.