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

Can't add pattern #*# to ignore list #6012

Closed
michaelstingl opened this issue Sep 8, 2017 · 4 comments
Closed

Can't add pattern #*# to ignore list #6012

michaelstingl opened this issue Sep 8, 2017 · 4 comments
Assignees
Labels
blue-ticket ReadyToTest QA, please validate the fix/enhancement type:bug
Milestone

Comments

@michaelstingl
Copy link
Contributor

One of our users can't add the pattern #*# to the client's ignore list. Trying to add this pattern manually into the sync-exclude.lst results in the client is deleting this entry.

Our user wants to exclude temporary emacs files with this entry.

Tested with v2.3.2 on Linux Mint 17.x.

@SamuAlfageme Any idea why this isn't working as expected?

00008148

@michaelstingl
Copy link
Contributor Author

Some more thoughts:

Maybe it has to do with the first #. I can add *#*#, but not #*#.
The # is a comment in bash and some other files.
Maybe it's the reason?

With the pattern *#*# I will ignore the file #Test.txt#, but it will ignore a#test.txt#, too. So, that's not a clean workaround.

@guruz guruz added this to the 2.4.0 milestone Sep 11, 2017
@SamuAlfageme
Copy link
Contributor

Indeed lines starting with # in the sync-exclude.lst are being ignored as comments:

if (*entry != '#') {
const char *unescaped = csync_exclude_expand_escapes(entry);
rc = _csync_exclude_add(list, unescaped);
if( rc == 0 ) {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", unescaped);
}
SAFE_FREE(unescaped);
if (rc < 0) {
goto out;
}
}

We should provide a way to exclude these; i.e. escaping the pattern somehow.

@guruz guruz modified the milestones: 2.5.0, 2.4.0 Sep 11, 2017
@ckamm
Copy link
Contributor

ckamm commented Sep 13, 2017

Simple suggestion: Allow # to become #, and add a example comment to the default sync-exclude.lst. However, when you use the ignore list editor to add '#foo', this will actually end up just adding a comment, which is counter-intuitive and also needs to be fixed.

ckamm added a commit that referenced this issue Sep 14, 2017
Otherwise adding patterns that start with # are impossible to add, since
they get treated as comments. Also add this escaping for patterns added
in the ui.
ckamm added a commit that referenced this issue Sep 14, 2017
Otherwise adding patterns that start with # are impossible to add, since
they get treated as comments. Also add this escaping for patterns added
in the ui.
@ckamm ckamm self-assigned this Sep 14, 2017
@ckamm ckamm added the ReadyToTest QA, please validate the fix/enhancement label Sep 14, 2017
@ckamm ckamm modified the milestones: 2.5.0, 2.4.0 Sep 14, 2017
@SamuAlfageme
Copy link
Contributor

👍 neat!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blue-ticket ReadyToTest QA, please validate the fix/enhancement type:bug
Projects
None yet
Development

No branches or pull requests

4 participants