Fossil SCM
wrongly reported illigal character, "[" and "]"
46bf4baedcea6ca…
· opened 16 years, 2 months ago
- Type
- Code_Defect
- Priority
- —
- Severity
- Important
- Resolution
- Fixed
- Subsystem
- —
- Created
- Feb. 10, 2010 10:19 a.m.
This has been tested under windows only.
Create a file named: $ () + ,-!= @ [ ]^_{ }~.txt
This file is perfectly legal under windows (WinXP) but if i try to add it via: fossil add "testCase-fileUpload\$ () + ,-!= @ [ ]^_{ }~.txt"
I get
fossil: filename contains illegal characters: testCase-fileUpload/$ ( ) + ,-!= @ [ ]^_{ }~.txt
Basically it chokes over the ] and [ characters.
Regards.
drh added on 2010-02-10 13:20:00:
The [ and ] characters are also legal for Unix filenames. (Any character
other than 0x00 and / is valid in a unix filename.) But [ and ] are used
as globbing characters by the shell, so there use must be escaped in the shell.
this can lead to subtle problems. So as a safety mechanism, I deliberately
disallow such filename characters in Fossil.
Behavior is by design.
anonymous added on 2012-11-19 01:46:46 UTC: Yes, I agreed [ and ] has special usage under Unix, but I am a Win32 user, and I have a lots of files contains [ and ]. So I think we should add a option to check whether we need to valid those characters, by default, it's ON, but I can choose to disable it(OFF to check it) . It's the only blocker stops me to use fossil..