Opened 7 years ago

Closed 6 years ago

#267 closed defect (fixed)

Make _abspath() use path rewrite feature

Reported by: dmik Owned by: bird
Priority: normal Milestone: libc-0.6.6
Component: libc Version: 0.6.4
Severity: normal Keywords:


It seems that _abspath() does not involve a call to __libc_PathRewrite() to expand things like /@unixroot/my/path to proper paths. As a result, an attempt to call this function on such a path will return X:/@unixroot/my/path (where X: is the current drive) which in most cases will be a completely invalid path (which doesn't lead to what the original path before calling _abspath() would lead to).

More details are here

Change History (3)

comment:1 Changed 6 years ago by bird

Component: baselayoutlibc
Milestone: libc-0.6.6
Severity: blockernormal
Status: newaccepted

comment:2 Changed 6 years ago by bird

The _abspath implemenation has other quirks, like _abspath("/dev/nul") or _abspath("/pipe/mypipe") will come out equally messed up by drive letters. Not to mention anything starting with a slash (or more than three) in chroot'ed mode.

Then there seems to be confusion as to what qualifies as a UNC path. The code only checks for two leading slashes before it concludes that it's a UNC path. That's not how OS/2 and Windows detects UNC paths - there should be exactly two slashes, no more.

The /dev/xxx and /pipe/yyy stuff is going to be interesting... I think we're just going to have to live with them never getting a drive letter in front of them. The path rewriting should be easier to handle, I think...

comment:3 Changed 6 years ago by bird

Resolution: fixed
Status: acceptedclosed

Implemented in r3924 (0.6) and r3925 (trunk).

Note: See TracTickets for help on using tickets.