BaseXdb / basex

BaseX Main Repository.
http://basex.org
BSD 3-Clause "New" or "Revised" License
695 stars 264 forks source link

"Illegal character in path" warnings when run from directory whose path contains [ #2323

Closed xyzzy-plugh-plover closed 3 months ago

xyzzy-plugh-plover commented 3 months ago

Description of the Problem

The following basex 11.1 on macOS command line outputs a warning message twice when it is run from a directory whose absolute path contains a [ (basex might output similar errors for other offending characters):

$ pwd
<path containing a [>

$ basex -i <path> <xpath>
Illegal character in path at index <index>: <file: url to pwd>
Illegal character in path at index <index>: <file: url to pwd>

Expected Behavior

No warnings

Steps to Reproduce the Behavior

$ mkdir '['
$ cd '['
$ basex -i <path-to-xml-file> <xpath>

Do you have an idea how to solve the issue?

URL encode the path for the pwd before using it in a URL.

What is your configuration?

basex 11.1 installed from brew zsh 5.9 installed from brew macOS 12.7.6

ChristianGruen commented 3 months ago

Thanks for the observation. The warning can be safely ignored. In the upcoming versions, it will only be output if debugging is enabled.