Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not set advanced options with empty string to true #4977

Merged
merged 1 commit into from May 21, 2024

Conversation

Jojo-1000
Copy link
Contributor

There are advanced options such as force-local that expect an empty string in some cases. While saving, these were replaced with true even though there was an equals sign. Now only options without an equals sign are set to true.

The options were not set to true when opening the configuration but already when saving, so the saved backup configuration was different than in the UI.

Closes #4757

Steps to reproduce

  1. Make a backup set in the GUI
  2. set the force-locale option to blank string
  3. save, close and re-open the config page of that backup
  4. see that the blank field was filled with true
  5. run the backup
  6. warning that true is not a valid locale appears
  • Actual result:
    Option automatically set to true.
    Backup throws warning
  • Expected result:
    Option should remain blank.
    Backup should complete without warning.

Old behavior

Set flags and empty values to true before saving:
--dry-run => --dry-run=true
--force-locale= => --force-locale=true

New behavior

Set flags to true (as before):
--dry-run => --dry-run=true

Keep empty options with empty value:
--force-locale= => --force-locale=

There are advanced options such as force-local that expect an empty string in some cases. While saving, these were replaced with 'true' even though there was an equals sign.
Now only options without an equals sign are set to true.

Closes duplicati#4757
@kenkendk kenkendk merged commit aaf1067 into duplicati:master May 21, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GUI advanced option force-locale replaces blank string with true
2 participants