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

Bug: syncInternalFilesIgnorePatterns (Skip patterns) does not work for patterns with uppercase characters. #168

Open
eth-p opened this issue Jan 28, 2023 · 3 comments

Comments

@eth-p
Copy link

eth-p commented Jan 28, 2023

When supplying skip patterns for the internal file sync, patterns that rely on uppercase characters cannot be skipped (e.g. .DS_Store).

This is a consequence of using toLocaleLowerCase in:

obsidian-livesync/src/main.ts

Lines 1151 to 1153 in fad9fed

const ignorePatterns = this.settings.syncInternalFilesIgnorePatterns.toLocaleLowerCase()
.replace(/\n| /g, "")
.split(",").filter(e => e).map(e => new RegExp(e));

And in a few other places.

@vrtmrz
Copy link
Owner

vrtmrz commented Jan 29, 2023

I am delighted with your report and inspection!
You are quite right, probably, we should use the i flag instead of converting to lower cases.

Would I wait for your PR #167? I do not wish to interrupt or rush your excellent work!

@eth-p
Copy link
Author

eth-p commented Jan 29, 2023

I have upcoming midterms, so it might be a couple of weeks until I completely finish #167. For now, the i flag seems like a good idea to fix this problem for the time being. I can rebase my changes later if need be :)

@vrtmrz
Copy link
Owner

vrtmrz commented Feb 9, 2023

@eth-p
Sorry for being late to reply!
This should be fixed in v0.17.21. Could you please check the behaviour?

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

No branches or pull requests

2 participants