proxmox/proxmox-sys
Dominik Csapak 1e2aa3eea4 partially fix #2915: proxmox-sys: scandir: stat if file_type is unknown
when using readdir/getdents the file type might be 'DT_UNKNOWN'
(depending on the filesystem). Do a fstatat in that case to
get the file type. Since maybe the callback wants to do
a stat anyway, pass it there (if done)

adds two new helpers:
'file_type_from_file_stat': uses a FileStat struct to get the file type
'get_file_type': calls fstatat to determine the file_type

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
2022-06-29 09:34:34 +02:00
..
debian bump proxmox-sys to 0.3.0 2022-06-02 14:33:12 +02:00
src partially fix #2915: proxmox-sys: scandir: stat if file_type is unknown 2022-06-29 09:34:34 +02:00
tests sys: rust fmt 2022-04-10 17:39:31 +02:00
Cargo.toml bump proxmox-sys to 0.3.0 2022-06-02 14:33:12 +02:00