Opened 5 years ago

Last modified 4 years ago

#13485 new Bugs

parent_path() edge case returns wrong result on Windows

Reported by: Alex Weiss <alexweiss86@…> Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.66.0 Severity: Problem
Keywords: Cc:

Description

The path "C:
", while unusual, is legal in Windows and equivalent to "C:\". According to the path decomposition table, that means that

parent_path(L"C:\\\\")

should return "C:". However, it returns "C:\".

The same is true for every variation with more than one trailing separator (preferred or generic).

Change History (2)

comment:1 by Alex Weiss <alexweiss86@…>, 5 years ago

WikiFormatting mutilated the first path in my post. It is supposed to read

C:\\

comment:2 by John Maddock, 4 years ago

Component: Nonefilesystem
Owner: set to Beman Dawes
Note: See TracTickets for help on using tickets.