diff options
Diffstat (limited to 'src-qt5/core/lumina-session/session.cpp')
-rw-r--r-- | src-qt5/core/lumina-session/session.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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() ); |