… | |
… | |
1395 | return; |
1395 | return; |
1396 | } |
1396 | } |
1397 | } |
1397 | } |
1398 | #else |
1398 | #else |
1399 | #if HAVE_AT |
1399 | #if HAVE_AT |
1400 | if (req->wd) |
|
|
1401 | { |
1400 | { |
1402 | int fd = openat (WD2FD (req->wd), req->ptr1, O_CLOEXEC | O_SEARCH | O_DIRECTORY); |
1401 | int fd = openat (WD2FD (req->wd), req->ptr1, O_CLOEXEC | O_SEARCH | O_DIRECTORY); |
1403 | |
1402 | |
1404 | if (fd < 0) |
1403 | if (fd < 0) |
|
|
1404 | return; |
|
|
1405 | |
|
|
1406 | dirp = fdopendir (fd); |
|
|
1407 | |
|
|
1408 | if (!dirp) |
|
|
1409 | { |
|
|
1410 | silent_close (fd); |
1405 | return; |
1411 | return; |
1406 | |
|
|
1407 | dirp = fdopendir (fd); |
|
|
1408 | |
|
|
1409 | if (!dirp) |
|
|
1410 | silent_close (fd); |
|
|
1411 | } |
1412 | } |
1412 | else |
1413 | } |
1413 | dirp = opendir (req->ptr1); |
|
|
1414 | #else |
1414 | #else |
1415 | dirp = opendir (wd_expand (&self->tmpbuf, req->wd, req->ptr1)); |
1415 | dirp = opendir (wd_expand (&self->tmpbuf, req->wd, req->ptr1)); |
|
|
1416 | |
|
|
1417 | if (!dirp) |
|
|
1418 | return; |
1416 | #endif |
1419 | #endif |
1417 | |
|
|
1418 | if (!dirp) |
|
|
1419 | return; |
|
|
1420 | #endif |
1420 | #endif |
1421 | |
1421 | |
1422 | if (req->flags & EIO_FLAG_PTR1_FREE) |
1422 | if (req->flags & EIO_FLAG_PTR1_FREE) |
1423 | free (req->ptr1); |
1423 | free (req->ptr1); |
1424 | |
1424 | |
… | |
… | |
1681 | } |
1681 | } |
1682 | |
1682 | |
1683 | eio_wd |
1683 | eio_wd |
1684 | eio_wd_open_sync (eio_wd wd, const char *path) |
1684 | eio_wd_open_sync (eio_wd wd, const char *path) |
1685 | { |
1685 | { |
1686 | struct etp_tmpbuf tmpbuf = { }; |
1686 | struct etp_tmpbuf tmpbuf = { 0 }; |
1687 | wd = eio__wd_open_sync (&tmpbuf, wd, path); |
1687 | wd = eio__wd_open_sync (&tmpbuf, wd, path); |
1688 | free (tmpbuf.ptr); |
1688 | free (tmpbuf.ptr); |
1689 | |
1689 | |
1690 | return wd; |
1690 | return wd; |
1691 | } |
1691 | } |