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

Support glob patterns in the configuration file #209

Merged
merged 2 commits into from
Jan 9, 2022

Conversation

RyuzakiKK
Copy link
Contributor

  • Bail out if multiple config entries match a single location
    If we have more than one entry in the configuration file that match the
    location string that we are currently using (e.g. one with a trailing
    slash and another without), we will end up choosing one configuration at
    random.

    When this situation arise, we should instead abort the execution to
    avoid unexpected results.

  • Support glob patterns in the configuration file
    This makes the configuration file more flexible.

The first commit has the potential to break backwards compatibility. Right now a configuration file that had both /foo/bar and /foo/bar/ was acceptable, and at runtime Desync was choosing one of them in an undefined order.

If we have more than one entry in the configuration file that match the
location string that we are currently using (e.g. one with a trailing
slash and another without), we will end up choosing one configuration at
random.

When this situation arise, we should instead abort the execution to
avoid unexpected results.

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
Copy link
Owner

@folbricht folbricht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good. Thank you

README.md Outdated Show resolved Hide resolved
cmd/desync/config.go Outdated Show resolved Hide resolved
This makes the configuration file more flexible.

Closes: folbricht#208

Signed-off-by: Ludovico de Nittis <ludovico.denittis@collabora.com>
@folbricht folbricht merged commit 5dd803e into folbricht:master Jan 9, 2022
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.

None yet

2 participants