Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use the proper name when reading system exclude config file #6568

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/libsync/configfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* for more details.
*/

#include "config.h"

Check failure on line 15 in src/libsync/configfile.cpp

View workflow job for this annotation

GitHub Actions / build

src/libsync/configfile.cpp:15:10 [clang-diagnostic-error]

'config.h' file not found

#include "configfile.h"
#include "theme.h"
Expand Down Expand Up @@ -404,14 +404,14 @@
{
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 {
Expand All @@ -421,7 +421,7 @@
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;
}
Expand All @@ -433,7 +433,7 @@
#ifdef Q_OS_MAC
// exec path is inside the bundle
fi.setFile(QCoreApplication::applicationDirPath(),
QLatin1String("../Resources/") + exclFile);
QLatin1String("../Resources/") + syncExclFile);
#endif

return fi.absoluteFilePath();
Expand Down
Loading