From 27f3ef3177ced60f3cf18b0164ac8a42309df3bb Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 12 Mar 2019 15:07:35 -0400 Subject: Make sure that if a blank compton.conf exists, that it is properly replaced with the "real" conf. --- src-qt5/core/lumina-session/session.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src-qt5/core') 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); } -- cgit