Hi BaseX team!
When I try to add a HTML file that contains '[', ']', '{' or '}' in its file
name (like "Test[].html") by selecting its parent folder, then I get an error
message like this:
Resource "C:\Program Files (x86)\BaseX\file:\C:\Test\Test[].html (The filename,
directory name, or volume label syntax is incorrect)" not found.
It seems that in this case the current BaseX working directory is prefixed to
the actual path.
This happens when I set "Import format" to RAW or when I set "Import format" to
anything but HTML and check "Add other files as binary files" in the GUI.
When I set "Import format" to HTML or XML then the file is added to the databse.
With the command line the behaviour is the same when trying to add Test[].html
in C:\Test\:
BaseX 12.2 [Standalone]
Try 'help' to get more information.
> CREATE DB Test
Database 'Test' created in 10.91 ms.
> OPEN Test
Database 'Test' was opened in 0.02 ms.
> SET PARSER raw
PARSER: raw
> SET CREATEFILTER *
CREATEFILTER: *
> ADD "C:\Test\"
Resource "C:\Program Files (x86)\BaseX\bin\file:\C:\Test\Test[].html (The
filename, directory name, or volume label syntax is incorrect)" not found.
!--- Manually renamed Test[].html to Test.html ---!
> ADD "C:\Test\"
Resource(s) added in 2.6 ms.
I assume that !#$%&'()+-=@[]^_{}~ are valid characters for file names in BaseX.
Am I getting something wrong or might this be a bug? I used the BaseX122.exe
installer on Windows 11. BaseX119 and BaseX123-20260129.122524 behave the same.