Open manuth opened 4 years ago
Another way the schema could be reworked would be some sort of an "Action"-field to set a single action or an array of actions. This would allow to implement more actions yet to come for single folders:
"LeftURI": "https://[...]/Documents",
"SelectiveRoots": [
{ "Path": "/", "Action": "Include" },
{ "Path": "/Keys", "Action": "Ignore (or 'Exclude')" },
{ "Path": "/Keys/KeePass", "Action": "Include" }
]
I also need this feature. But I think an ignore list ( for folders & files ) is enough, keep it simple.
General
The selective sync might become a very powerful but there are some troubles with it atm. Currently it's not possible to sync the root using selective sync.
So let's say we have this tree:
If I decide to sync the
Documents
folder and enable the Selective Sync I cannot sync the files inside theDocuments
folder as onlyKeys
,Schook
andWork
can be selected when hittingSelect folder(s)
.Also excluding sub-nodes is not possible. If we assume we have this tree:
If I decide to sync the "Personal Files" and I want to perform a selective sync of
Documents
,School
andWork
, but notKeys
though I can deselectKeys
in theSelect folder(s)
dialogue but it still would syncKeys
becauseDocuments
is selected.One more case that isn't covered using the current implementation of the selective sync: Think of implementing some sort of "ExcludedRoots" it wouldn't be possible to include subnodes of them:
If I would want to exclude
Keys
but include theKeePass
directory it wouldn't be possible as the parent nodeKeys
is excluded already.Conclusion and Examples
This leads me to following recommendation:
Rework the
SelectireRoots
-option of the config-schema to look the following:The entries would then be processed by the order of their appearance, which means:
"/"
is included"/Keys"
is excluded, but..."/Keys/KeePass"
is includedAlso I'd recommend to enable the checkboxes in the
Select folder(s)
dialogue to match the current config. That way the initial state of said dialoue would represent to current settings.Another example:
"/"
is included"/Keys/KeePass"
is included"/Keys"
is excluded which causes"/Keys/KeePass"
to be excluded as well