git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Windows absolute drive path detection incomplete

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 9, 2019, 00:22 UTC
Message-ID
<20190809002246.GL118825@genre.crustytoothpaste.net>
In-Reply-To
<DB7PR83MB0268816EF2F435EF791272C197D70@DB7PR83MB0268.EURPRD83.prod.outlook.com>
On 2019-08-08 at 16:44:52, Christopher Ertl wrote:
> So I'm proposing to remove the check for the drive letter being alpha in `has_dos_drive_prefix` macro:
> 
> #define has_dos_drive_prefix(path) \
> 	( (path)[1] == ':' ? 2 : 0)

Is the drive character required to be ASCII? If it can be non-ASCII Unicode, then this doesn't work, because the drive character will be encoded in UTF-8 and will be longer than one character.

An ABNF grammar of valid Windows path names would be helpful here.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Christopher Ertl
Message 4 of 4 in “Windows absolute drive path detection incomplete”
  1. Christopher ErtlAug 8, 2019
  2. Eric SunshineAug 8, 2019
  3. Christopher ErtlAug 8, 2019
  4. brian m. carlsonAug 9, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.