From ed737daa583670a2c675362ca4d83a3c39b87109 Mon Sep 17 00:00:00 2001 From: casey langen Date: Tue, 12 Mar 2019 23:07:32 -0700 Subject: [PATCH] Let's put the stderr log in the data dir. --- src/musikcube/Main.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/musikcube/Main.cpp b/src/musikcube/Main.cpp index 0a6d9f054..3deacb40b 100644 --- a/src/musikcube/Main.cpp +++ b/src/musikcube/Main.cpp @@ -104,20 +104,14 @@ int main(int argc, char* argv[]) { #ifdef WIN32 musik::core::RemoveOldDlls(); AddDllDirectory(u8to16(musik::core::GetPluginDirectory()).c_str()); -#endif - -#ifndef WIN32 - #if 1 /*DEBUG*/ - freopen("/tmp/musikcube_error.log", "w", stderr); - #else - freopen("/dev/null", "w", stderr); - #endif -#endif - #ifdef __PDCURSES__ PDC_set_resize_limits(MIN_HEIGHT, 1000, MIN_WIDTH, 1000); resize_term(26, 100); /* must be before app init */ #endif +#endif + + std::string errorFn = musik::core::GetDataDirectory() + "stderr.txt"; + freopen(errorFn.c_str(), "w", stderr); musik::core::MigrateOldDataDirectory();