Opened 11 years ago

Last modified 11 years ago

#5988 new Bugs

boost::filesystem::absolute doesn't work with ../relative_path or ./relative_path

Reported by: Sachin Garg <schngrg@…> Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc: schngrg@…

Description

In boost filesystem v3, boost::filesystem::absolute only appends the relative path to base path. It should also remove "./" from relative paths and "backtrack" on base path if relative path contains "../../" etc.

For example, Input:

"d:\current\path" ".\..\relative\path"

Result obtained:

"d:\current\path\.\..\relative\path"

Desired result:

"d:\current\relative\path"

Change History (2)

comment:1 by Sachin Garg <schngrg@…>, 11 years ago

Cc: schngrg@… added

comment:2 by anonymous, 11 years ago

I think this is called normpath, not abspath.

Note: See TracTickets for help on using tickets.