Skip to content

Commit

Permalink
Overwrite the user exclude list when the client is branded.
Browse files Browse the repository at this point in the history
Enforce specific sync-exclude file to all users.

Signed-off-by: Camila Ayres <hello@camilasan.com>
  • Loading branch information
camilasan committed Feb 3, 2025
1 parent ba92ced commit 7248d1c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/libsync/configfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,12 @@ void ConfigFile::setupDefaultExcludeFilePaths(ExcludedFiles &excludedFiles)
const auto userList = cfg.excludeFile(ConfigFile::UserScope);
const auto legacyList = cfg.excludeFile(ConfigFile::LegacyScope);

if (Theme::instance()->isBranded() && QFile::exists(systemList) && QFile::copy(systemList, userList)) {
qCInfo(lcConfigFile) << "Overwriting user list" << userList << "with system list" << systemList;
excludedFiles.addExcludeFilePath(systemList);
return;
}

if (!QFile::exists(userList)) {
qCInfo(lcConfigFile) << "User defined ignore list does not exist:" << userList;

Expand Down

0 comments on commit 7248d1c

Please sign in to comment.