mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-28 08:12:28 +00:00
Emulate ENOTDIR better
This commit is contained in:
parent
b76b2be2d0
commit
8d1c81ac9f
35 changed files with 80 additions and 50 deletions
|
@ -23,14 +23,14 @@
|
|||
/**
|
||||
* Reads file metadata from αcτµαlly pδrταblε εxεcµταblε object store.
|
||||
*
|
||||
* @param uri is obtained via __zipos_parseuri()
|
||||
* @param name is obtained via __zipos_parseuri()
|
||||
* @asyncsignalsafe
|
||||
*/
|
||||
int __zipos_stat(struct ZiposUri *name, struct stat *st) {
|
||||
ssize_t cf;
|
||||
struct Zipos *zipos;
|
||||
if (!(zipos = __zipos_get())) return enoexec();
|
||||
if ((cf = __zipos_find(zipos, name)) == -1) return enoent();
|
||||
if ((cf = __zipos_find(zipos, name)) == -1) return -1;
|
||||
if (__zipos_stat_impl(zipos, cf, st)) return -1;
|
||||
st->st_ino = __zipos_inode(zipos, cf, name->path, name->len);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue