diff options
author | Ken Moore <moorekou@gmail.com> | 2016-05-06 08:04:54 -0400 |
---|---|---|
committer | Ken Moore <moorekou@gmail.com> | 2016-05-06 08:04:54 -0400 |
commit | c107b627961eb62b4bcf7f6a40e37eeb152624a7 (patch) | |
tree | 99c080d7b7471af8eb52b1247ebea0d05a996f1c /src-qt5/core | |
parent | Make the "quicksave" option in lumina-screenshot a bit more flexible with reg... (diff) | |
download | lumina-c107b627961eb62b4bcf7f6a40e37eeb152624a7.tar.gz lumina-c107b627961eb62b4bcf7f6a40e37eeb152624a7.tar.bz2 lumina-c107b627961eb62b4bcf7f6a40e37eeb152624a7.zip |
Add a check for the existence of the log dir before starting the processes.
Diffstat (limited to 'src-qt5/core')
-rw-r--r-- | src-qt5/core/lumina-session/main.cpp | 5 | ||||
-rw-r--r-- | src-qt5/core/lumina-session/session.cpp | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src-qt5/core/lumina-session/main.cpp b/src-qt5/core/lumina-session/main.cpp index 0ed3067a..8f89e95c 100644 --- a/src-qt5/core/lumina-session/main.cpp +++ b/src-qt5/core/lumina-session/main.cpp @@ -9,9 +9,6 @@ #include <QProcess> #include <QString> - - - #include "session.h" #include <LuminaUtils.h> #include <LuminaOS.h> @@ -39,7 +36,7 @@ int main(int argc, char ** argv) setenv("XDG_CURRENT_DESKTOP","Lumina",1); unsetenv("QT_QPA_PLATFORMTHEME"); //causes issues with Lumina themes - not many people have this by default... //Check for any missing user config files - + //Start X11 if needed //Configure X11 monitors if needed diff --git a/src-qt5/core/lumina-session/session.cpp b/src-qt5/core/lumina-session/session.cpp index 0e8f80ae..380ee370 100644 --- a/src-qt5/core/lumina-session/session.cpp +++ b/src-qt5/core/lumina-session/session.cpp @@ -45,9 +45,12 @@ void LSession::procFinished(){ } void LSession::startProcess(QString ID, QString command){ - QString logfile = QDir::homePath()+"/.lumina/logs/"+ID+".log"; + QString dir = QDir::homePath()+"/.lumina/logs"; + if(!QFile::exists(dir)){ QDir tmp(dir); tmp.mkpath(dir); } + QString logfile = dir+"/"+ID+".log"; if(QFile::exists(logfile+".old")){ QFile::remove(logfile+".old"); } if(QFile::exists(logfile)){ QFile::rename(logfile,logfile+".old"); } + QProcess *proc = new QProcess(); proc->setProcessChannelMode(QProcess::MergedChannels); proc->setProcessEnvironment( QProcessEnvironment::systemEnvironment() ); |