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

Brackets [] are actually allowed in file names on Windows #485

Open
walteweiss opened this issue Jan 15, 2020 · 3 comments
Open

Brackets [] are actually allowed in file names on Windows #485

walteweiss opened this issue Jan 15, 2020 · 3 comments

Comments

@walteweiss
Copy link

On Windows, escaping special characters is not supported as the \ character is used as a path separator. On the other hand, special characters such as [ and ? are not allowed in file names on Windows.

From the documentation: How can I exclude files with brackets ([]) in the name?

While it’s true to the ? question mark symbol, it’s not true to the brackets [], here’s the proof, and anyone can check that on Windows.

Brackets do work on Windows in the filenames.

It’s a minor mistake, but it’s confusing.

@walteweiss walteweiss changed the title Not exactly Filenames on Windows support brackets [] Jan 15, 2020
@walteweiss walteweiss changed the title Filenames on Windows support brackets [] Brackets [] are actually allowed in file names on Windows Jan 15, 2020
@walteweiss
Copy link
Author

Excuse me if this should be handled differently, maybe I can help reformulate this, but I have found only open an issue or fork the project.

@calmh
Copy link
Member

calmh commented Jan 16, 2020

No this is fine, just need to come up with a more correct phrasing of that faq item. I wonder if, for example, a left bracket can in fact be matched by putting it inside brackets ([[]) or if that's a syntax error to the parser. Otherwise it's just ? to match such characters.

@TekBear
Copy link

TekBear commented Jun 22, 2020

phrasing of that faq item. I wonder if, for example, a left bracket can in fact be matched by putting it inside brackets ([[]) or if that's a syntax error to the parser. Otherwise it's just ? to match such characters.

I just noticed the same glitch reading documentation. I get that this needs a deeper rewording but let's not wait another 5 months can you change this now to

On the other hand, special characters such as ? are not allowed in file names on Windows.

and commit as an interim fix until it is fully addressed?

Perhaps there is some confusion between glob and regular expressions. I am not a Syncthing developer - escaping glob characters is it part of glob library function or is it a chunk of Syncthing code mimicking what a command shell normally handles ??

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

3 participants