diff options
| -rwxr-xr-x | docker/build-inner.sh | 2 | ||||
| -rw-r--r-- | src/src/loglist.cpp | 17 |
2 files changed, 3 insertions, 16 deletions
diff --git a/docker/build-inner.sh b/docker/build-inner.sh index e810ad4..fc7ace5 100755 --- a/docker/build-inner.sh +++ b/docker/build-inner.sh @@ -435,7 +435,6 @@ export QT_QPA_PLATFORM_PLUGIN_PATH="${RUN}/qt6plugins/platforms" # can easily exceed the default 1024 ulimit -n 65536 2>/dev/null -export FLUORINE_LAUNCH_DIR="${PWD}" cd "${RUN}" exec "${RUN}/ModOrganizer-core" "$@" LAUNCH @@ -670,7 +669,6 @@ export XDG_CURRENT_DESKTOP="${XDG_CURRENT_DESKTOP:-KDE}" # can easily exceed the default 1024 ulimit -n 65536 2>/dev/null -export FLUORINE_LAUNCH_DIR="${PWD}" cd "${APPIMAGE_DIR}" exec "${BIN}/ModOrganizer-core" "$@" APPRUN diff --git a/src/src/loglist.cpp b/src/src/loglist.cpp index b7ccda2..cf4b6a7 100644 --- a/src/src/loglist.cpp +++ b/src/src/loglist.cpp @@ -20,10 +20,8 @@ along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. #include "loglist.h"
#include "copyeventfilter.h"
#include "env.h"
-#include "fluorinepaths.h"
#include "organizercore.h"
#include <algorithm>
-#include <cstdlib>
using namespace MOBase;
@@ -242,10 +240,7 @@ void LogList::clear() void LogList::openLogsFolder()
{
#ifndef _WIN32
- const char* launchDir = std::getenv("FLUORINE_LAUNCH_DIR");
- const QString logsPath = (launchDir && launchDir[0])
- ? QString::fromUtf8(launchDir) + "/logs"
- : QDir::currentPath() + "/logs";
+ const QString logsPath = qApp->property("dataPath").toString() + "/logs";
#else
const QString logsPath = qApp->property("dataPath").toString() + "/" +
QString::fromStdWString(AppConfig::logPath());
@@ -410,14 +405,8 @@ bool createAndMakeWritable(const std::wstring& subPath) bool setLogDirectory(const QString& dir)
{
#ifndef _WIN32
- // Place logs in the directory the user launched fluorine from so they're
- // easy to find and share. Each launch creates a new timestamped log file
- // and the oldest are cleaned up to keep only the last 5.
- // FLUORINE_LAUNCH_DIR is set by the launcher script before it cd's elsewhere.
- const char* launchDir = std::getenv("FLUORINE_LAUNCH_DIR");
- const QString logDir = (launchDir && launchDir[0])
- ? QString::fromUtf8(launchDir) + "/logs"
- : QDir::currentPath() + "/logs";
+ // Place logs in the instance directory so each instance has its own logs.
+ const QString logDir = dir + "/logs";
QDir().mkpath(logDir);
// Create a timestamped log file for this session.
|
