Skip to content

Incorrect rescan interval on auto accepted encrypted folder #8572

Closed

Description

@Ratio2

Version: main

Rescan interval always change to 1 day, but gui only change 1 minute and 1 hour values to 1 day.

Activity

  1. added
    bug
    needs-triage
    on Oct 2, 2022
  2. added 2 commits that reference this issue on Oct 2, 2022
    7410527
    29e79f0
  3. acolomb commented on Oct 2, 2022

    @acolomb
    Member

    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.

  4. Ratio2 commented on Oct 2, 2022

    @Ratio2
    ContributorAuthor

    @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.

  5. acolomb commented on Oct 3, 2022

    @acolomb
    Member

    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?

  6. added a commit that references this issue on Oct 3, 2022
    f4fe85d
  7. Ratio2 commented on Oct 3, 2022

    @Ratio2
    ContributorAuthor

    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):

    1. Scan interval 0 - we use 0, since there is no point in scanning an encrypted folder if we do not scan a regular folder
    2. Scan interval is less than 1 day - use 1 day to keep the current behavior
    3. 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

  8. added a commit that references this issue on Oct 4, 2022
    bd036d9
  9. added a commit that references this issue on Dec 21, 2022
    f9d6847
  10. added a commit that references this issue on Dec 21, 2022
    2532377
  11. added this to the v1.22.3 milestone on Dec 27, 2022
  12. added a commit that references this issue on Jan 23, 2023
    f8b7cc4
  13. added
    frozen-due-to-age
    on Dec 22, 2023
  14. locked and limited conversation to collaborators on Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-ageneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions