mirror of
https://github.com/abraunegg/onedrive
synced 2026-03-14 14:35:46 +01:00
* Add a check for invalid exclusion 'sync_list' rule(s) - '!/*' or '!/' .. warn that this rule will not be used and to read the documentation for 'sync_list'
This commit is contained in:
parent
d29a737f3f
commit
fb4c16a622
1 changed files with 11 additions and 0 deletions
|
|
@ -106,6 +106,17 @@ class ClientSideFiltering {
|
|||
// Skip comments in file
|
||||
if (line[0] == ';' || line[0] == '#') continue;
|
||||
|
||||
// Is this an 'exclude' all rule because documentation has not been read correctly?
|
||||
if ((strip(line) == "!/*") || (strip(line) == "!/")) {
|
||||
// yes ...
|
||||
string errorMessage = "ERROR: Invalid sync_list rule '" ~ to!string(strip(line)) ~ "' detected. Please read the 'sync_list' documentation.";
|
||||
addLogEntry();
|
||||
addLogEntry(errorMessage, ["info", "notify"]);
|
||||
addLogEntry();
|
||||
// do not add this rule
|
||||
continue;
|
||||
}
|
||||
|
||||
// Is the rule a legacy 'include all root files' lazy rule?
|
||||
if ((strip(line) == "/*") || (strip(line) == "/")) {
|
||||
// yes ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue