use the proper name when reading system exclude config file
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 22 Mar 2024 09:37:32 +0000 (10:37 +0100)
committerMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 22 Mar 2024 09:40:45 +0000 (10:40 +0100)
Close #6539

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
src/libsync/configfile.cpp

index d46ad50f0e87c9f4449ca94eb255d2ac9a40624f..abc9eb8a84a605872b7be98c95aa3e7718a87aac 100644 (file)
@@ -404,14 +404,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 {
@@ -421,7 +421,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;
                     }
@@ -433,7 +433,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();