From ca7df74dee9e13ccc12d701af2ab95db58d912c1 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Fri, 22 Mar 2024 10:37:32 +0100 Subject: [PATCH] use the proper name when reading system exclude config file Close #6539 Signed-off-by: Matthieu Gallien --- src/libsync/configfile.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp index 7583956d8f5dc..05dcfbbf6e531 100644 --- a/src/libsync/configfile.cpp +++ b/src/libsync/configfile.cpp @@ -406,14 +406,14 @@ QString ConfigFile::excludeFileFromSystem() { QFileInfo fi; #ifdef Q_OS_WIN - fi.setFile(QCoreApplication::applicationDirPath(), exclFile); + fi.setFile(QCoreApplication::applicationDirPath(), syncExclFile); #endif #ifdef Q_OS_UNIX - fi.setFile(QString(SYSCONFDIR "/" + Theme::instance()->appName()), exclFile); + fi.setFile(QString(SYSCONFDIR "/" + Theme::instance()->appName()), syncExclFile); if (!fi.exists()) { // Prefer to return the preferred path! Only use the fallback location // if the other path does not exist and the fallback is valid. - QFileInfo nextToBinary(QCoreApplication::applicationDirPath(), exclFile); + QFileInfo nextToBinary(QCoreApplication::applicationDirPath(), syncExclFile); if (nextToBinary.exists()) { fi = nextToBinary; } else { @@ -423,7 +423,7 @@ QString ConfigFile::excludeFileFromSystem() d.cdUp(); // go out of usr if (!d.isRoot()) { // it is really a mountpoint if (d.cd("etc") && d.cd(Theme::instance()->appName())) { - QFileInfo inMountDir(d, exclFile); + QFileInfo inMountDir(d, syncExclFile); if (inMountDir.exists()) { fi = inMountDir; } @@ -435,7 +435,7 @@ QString ConfigFile::excludeFileFromSystem() #ifdef Q_OS_MAC // exec path is inside the bundle fi.setFile(QCoreApplication::applicationDirPath(), - QLatin1String("../Resources/") + exclFile); + QLatin1String("../Resources/") + syncExclFile); #endif return fi.absoluteFilePath();