[Toybox] XBSPATH() bug
Ashwini Sharma
ak.ashwini at gmail.com
Wed Apr 24 22:12:20 PDT 2013
Hi Rob,
Calling xabspath() function with "exact=1", makes sure that the last path
component exists.
I think the decision making statement
fd = openat(dirfd, s, 0);
if (fd == -1 && (exact || todo || errno != ENOENT)) goto error;
will jump to error:, when openat fails, though the 's' is the last
component in the path.
Failing to open the last component with errno != ENOENT doesn't mean the
component doesn't exist.
The check should be modified to see if the fail happens at last component
or otherwise.
Do provide your inputs on the same.
regards,
Ashwini
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20130425/50b1bbc8/attachment.htm>
More information about the Toybox
mailing list