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

refactor: Move "--old-args" check into manage profiles dialog #1886

Closed
buhtz opened this issue Sep 27, 2024 · 0 comments · Fixed by #1889
Closed

refactor: Move "--old-args" check into manage profiles dialog #1886

buhtz opened this issue Sep 27, 2024 · 0 comments · Fixed by #1889
Assignees
Labels
Code Quality About code quality, refactoring, (unit) testing, linting, ... External depends on others/upstream High Qt Qt bugs, code or features

Comments

@buhtz
Copy link
Member

buhtz commented Sep 27, 2024

Notifier for me.
Move that "--old-args" check into the Manage Profiles dialog code. Check for focusOutEvent event to validate the QTextEdit content.

backintime/common/config.py

Lines 1211 to 1225 in 525da07

def rsyncOptions(self, profile_id = None):
#?rsync options. Options must be quoted e.g. \-\-exclude-from="/path/to/my exclude file"
val = self.profileStrValue('snapshots.rsync_options.value', '', profile_id)
if '--old-args' in val:
logger.warning(
'Found rsync flag "--old-args". That flag will be removed '
'from the options because it conflicts with '
'the flag "-s" (also known as "--secluded-args" or '
'"--protected-args") which is used by Back In Time to force '
'the "new form of argument protection" in rsync.'
)
val = val.replace('--old-args', '')
return val

Background: To improve code structure and logic related to replacing config management (#1850).

@buhtz buhtz added High Qt Qt bugs, code or features External depends on others/upstream Code Quality About code quality, refactoring, (unit) testing, linting, ... labels Sep 27, 2024
@buhtz buhtz self-assigned this Sep 27, 2024
@buhtz buhtz added this to the Upcoming release milestone Sep 27, 2024
@buhtz buhtz closed this as completed in 0910982 Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Quality About code quality, refactoring, (unit) testing, linting, ... External depends on others/upstream High Qt Qt bugs, code or features
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant