Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#283 closed defect (fixed)

stat() fails on /@unixroot

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

Description

If you do

  struct stat st;
  int rc = stat("/@unixroot", &st);

you will get -1 and errno=2. OTOH, stat("/unixroot/")(i.e. with a trailing slash) works fine.

This is a bogus behavior since for all other directory paths the result will be the same, regardless of the trailing slash.

Change History (6)

comment:1 by dmik, 11 years ago

This in particular affects the Python's os.path.realpath implementation (together with another defect), see #284 for more details.

comment:2 by dmik, 11 years ago

I guess that for the same (or a similar) reason this command

install -d /@unixroot/usr/local

fails with:

install: cannot create directory `/@unixroot': File exists

comment:3 by bird, 11 years ago

Milestone: libc-0.6.6
Priority: highnormal
Severity: majornormal

comment:4 by bird, 11 years ago

Owner: set to bird
Status: newaccepted

comment:5 by bird, 10 years ago

Component: libclibc-backend
Resolution: fixed
Status: acceptedclosed

I guess you may be using UNIXROOT=X: instead of UNIXROOT=X:/. As of r3917 / r3918 that's accepted and corrected automatically (also correcting UNIXROOT=E:/myunix/// to UNIXROOT=E:/myunix automatically). This is possibly a problem with the re-writer rule validation, and/or assumptions in the fsResolveUnix() code about getting something with a root slash after rewriting.

comment:6 by Yuri Dario, 10 years ago

I used UNIXROOT=x: in all rpm/yum installations... but it is good to know it is now officially supported :-))

Note: See TracTickets for help on using tickets.