You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incorrect rescan interval on auto accepted encrypted folder #8572
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionneeds-triageNew issues needed to be validated
I believe this works as designed? When accepting in the GUI, the same default rescan interval of 86400 seconds is preset, which you can change before saving though.
Doing the same for auto-accepts was added recently in #8427. Since the user has no chance to adjust it, we simply use the default value. Note that rescanning is usually not necessary for receive-encrypted folders, as the locally encrypted files can not be edited reasonably.
Right, the GUI code assumes that the interval should only change automatically with the other settings (watcher enabled / folder type) when it's value is still among the three possible defaults. Duplicating this logic in the backend for the auto-accept case is error-prone, as we can see there is already a slight difference in behavior.
This functionality predates the possibility to set defaults for the folder config, so I guess we really need to define what the desired behavior is. If someone deliberately sets the default interval to one day for example, it will be changed back to a minute or an hour depending on the folder type / watcher setting. That is unexpected and not transparent. Maybe we can come up with an approach to fix that as well, then mirror it to auto-accept?
I have taken your comments and made the necessary changes. These changes are minimal and do not require deepening the discussion. Now the scan interval cannot be less than the one set by the user. As a result, we have the following cases (the functionality has been tested):
Scan interval 0 - we use 0, since there is no point in scanning an encrypted folder if we do not scan a regular folder
Scan interval is less than 1 day - use 1 day to keep the current behavior
Scanning interval is greater than 1 day - we use the user setting, since it makes no sense to use a value less for an encrypted folder than for a regular folder
Note: pull-request auto checks failed because the problem is in the server, not in the code
bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussionneeds-triageNew issues needed to be validated
Activity
gui: Fix rescan interval on auto accepted encrypted folder (fixes sy…
lib/model: Fix rescan interval on auto accepted encrypted folder (fixes
acolomb commentedon Oct 2, 2022
I believe this works as designed? When accepting in the GUI, the same default rescan interval of 86400 seconds is preset, which you can change before saving though.
Doing the same for auto-accepts was added recently in #8427. Since the user has no chance to adjust it, we simply use the default value. Note that rescanning is usually not necessary for receive-encrypted folders, as the locally encrypted files can not be edited reasonably.
Ratio2 commentedon Oct 2, 2022
@acolomb No, interval for encrypted folder not changed in gui if we set 61 or 3601 in default folder configuration
My fix only replicate gui behavior when user add folder manually.
acolomb commentedon Oct 3, 2022
Right, the GUI code assumes that the interval should only change automatically with the other settings (watcher enabled / folder type) when it's value is still among the three possible defaults. Duplicating this logic in the backend for the auto-accept case is error-prone, as we can see there is already a slight difference in behavior.
This functionality predates the possibility to set defaults for the folder config, so I guess we really need to define what the desired behavior is. If someone deliberately sets the default interval to one day for example, it will be changed back to a minute or an hour depending on the folder type / watcher setting. That is unexpected and not transparent. Maybe we can come up with an approach to fix that as well, then mirror it to auto-accept?
lib/model: Don't use rescan interval less than user defaults on auto …
Ratio2 commentedon Oct 3, 2022
I have taken your comments and made the necessary changes. These changes are minimal and do not require deepening the discussion. Now the scan interval cannot be less than the one set by the user. As a result, we have the following cases (the functionality has been tested):
Note: pull-request auto checks failed because the problem is in the server, not in the code
lib/model: Don't use rescan interval less than user defaults on auto …
lib/model: Don't lower rescan interval from default on auto accepted …
Merge remote-tracking branch 'upstream/main' into coauthors
Merge branch 'main' into dockerpool