#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 , 12 years ago
comment:2 by , 12 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 , 12 years ago
| Milestone: | → libc-0.6.6 |
|---|---|
| Priority: | high → normal |
| Severity: | major → normal |
comment:4 by , 12 years ago
| Owner: | set to |
|---|---|
| Status: | new → accepted |
comment:5 by , 11 years ago
| Component: | libc → libc-backend |
|---|---|
| Resolution: | → fixed |
| Status: | accepted → closed |
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 , 11 years ago
I used UNIXROOT=x: in all rpm/yum installations... but it is good to know it is now officially supported :-))

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