aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/core/lumina-session/session.cpp
diff options
context:
space:
mode:
authorKen Moore <ken@ixsystems.com>2019-03-12 15:07:35 -0400
committerKen Moore <ken@ixsystems.com>2019-03-12 15:07:35 -0400
commit27f3ef3177ced60f3cf18b0164ac8a42309df3bb (patch)
tree43981f74722d09398e54dfe90cd66a665fc0151c /src-qt5/core/lumina-session/session.cpp
parentA couple changes for compositing: (diff)
downloadlumina-27f3ef3177ced60f3cf18b0164ac8a42309df3bb.tar.gz
lumina-27f3ef3177ced60f3cf18b0164ac8a42309df3bb.tar.bz2
lumina-27f3ef3177ced60f3cf18b0164ac8a42309df3bb.zip
Make sure that if a blank compton.conf exists, that it is properly replaced with the "real" conf.
Diffstat (limited to 'src-qt5/core/lumina-session/session.cpp')
-rw-r--r--src-qt5/core/lumina-session/session.cpp5
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 3dcd78fc..606ab1d9 100644
--- a/src-qt5/core/lumina-session/session.cpp
+++ b/src-qt5/core/lumina-session/session.cpp
@@ -105,7 +105,10 @@ void LSession::startProcess(QString ID, QString command, QStringList watchfiles)
void LSession::setupCompositor(bool force){
//Compton available - check the config file
QString set = QString(getenv("XDG_CONFIG_HOME"))+"/lumina-desktop/compton.conf";
- if(!QFile::exists(set) || LUtils::readFile(set).join("").simplified().isEmpty() ){
+ bool replaceconf = !QFile::exists(set);
+ if(!replaceconf){ replaceconf = (QFileInfo(set).size()<1); }
+ if( replaceconf ){
+ if(QFile::exists(set)){ QFile::remove(set); }
if(QFile::exists(LOS::LuminaShare()+"/compton.conf")){
QFile::copy(LOS::LuminaShare()+"/compton.conf", set);
}
bgstack15