fix(updater): logs/ folder
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
1f70589deb
commit
c0f0462550
@ -831,6 +831,12 @@ Application::Application(int& argc, char** argv) : QApplication(argc, argv)
|
||||
#ifdef Q_OS_MAC
|
||||
m_updater.reset(new MacSparkleUpdater());
|
||||
#else
|
||||
auto exe_name = QStringLiteral("%1_updater").arg(BuildConfig.LAUNCHER_APP_BINARY_NAME);
|
||||
#if defined Q_OS_WIN32
|
||||
exe_name.append(".exe");
|
||||
#endif
|
||||
auto updater_binary = QFileInfo(QDir(m_rootPath).absoluteFilePath(exe_name));
|
||||
if (updater_binary.isFile())
|
||||
m_updater.reset(new PrismExternalUpdater(m_rootPath, m_dataPath));
|
||||
#endif
|
||||
qDebug() << "<> Updater started.";
|
||||
@ -1058,7 +1064,7 @@ void Application::performMainStartupAction()
|
||||
{
|
||||
m_status = Application::Initialized;
|
||||
|
||||
auto update_log_path = FS::PathCombine(m_dataPath, "prism_launcher_update.log");
|
||||
auto update_log_path = FS::PathCombine(m_dataPath, "logs", "prism_launcher_update.log");
|
||||
|
||||
auto update_lock = QFileInfo(FS::PathCombine(m_dataPath, ".prism_launcher_update.lock"));
|
||||
if (update_lock.exists()) {
|
||||
|
@ -42,7 +42,7 @@ class UpdateAvailableDialog : public QDialog {
|
||||
const QString& availableVersion,
|
||||
const QString& releaseNotes,
|
||||
QWidget* parent = 0);
|
||||
~UpdateAvailableDialog();
|
||||
~UpdateAvailableDialog() = default;
|
||||
|
||||
private:
|
||||
Ui::UpdateAvailableDialog* ui;
|
||||
|
@ -343,10 +343,11 @@ PrismUpdaterApp::PrismUpdaterApp(int& argc, char** argv) : QApplication(argc, ar
|
||||
#endif
|
||||
}
|
||||
|
||||
m_updateLogPath = FS::PathCombine(m_dataPath, "prism_launcher_update.log");
|
||||
m_updateLogPath = FS::PathCombine(m_dataPath, "logs", "prism_launcher_update.log");
|
||||
|
||||
{ // setup logging
|
||||
static const QString logBase = BuildConfig.LAUNCHER_NAME + "Updater" + (m_checkOnly ? "-CheckOnly" : "") + "-%0.log";
|
||||
static const QString baseLogFile = BuildConfig.LAUNCHER_NAME + "Updater" + (m_checkOnly ? "-CheckOnly" : "") + "-%0.log";
|
||||
static const QString logBase = FS::PathCombine("logs", baseLogFile);
|
||||
auto moveFile = [](const QString& oldName, const QString& newName) {
|
||||
QFile::remove(newName);
|
||||
QFile::copy(oldName, newName);
|
||||
|
Loading…
Reference in New Issue
Block a user