-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Empty lines in exclude-file result in empty snapshot #915
Comments
Also somewhat related, as far as I can tell multiple usages of I couldn't find a Github issue for that but that probably is already tracked somewhere. Just thought I'd mention that because it's also somewhat unexpected behavior relating to exclude files, if you think it's reasonable I can open another issue for this specific problem. A quick workaround would be to use |
Hey, thanks a lot for the report and taking the time to debug this! I'll have a look. |
Could you please check if the code in #916 (branch |
Everything works perfectly now, both using empty lines and specifying multiple exclude files. Thanks for the quick response, that means a lot. Keeping this open until the PR is merged. |
yep, I'll close it when I merge the PR |
Output of
restic version
Expected behavior
my-exclude
:command:
I expect this to back up all of
/data
exceptfirst-line
andthird-line
.This is of course a simplified example, my real exclude files are much bigger and their readability benefits from empty lines.
Actual behavior
Because the file contains a newline, no files in
/data
get scanned:A quick search revealed this (possibly) relevant part of the code, where only comment lines are discarded, but empty lines get added as exclude patterns.
Removing the newline or replacing it with a comment results in the expected behavior.
Steps to reproduce the behavior
See
Expected behavior
.The text was updated successfully, but these errors were encountered: