Ticket #178 (new defect)
d_type != DT_REG usage in ./daemon/appdb.c
| Reported by: | https://www.google.com/accounts/o8/id?id=aitoawkfizjo1vqnauqe0xsneuqi-v2wlwhuglm | Owned by: | - |
|---|---|---|---|
| Priority: | major | Milestone: | 2 |
| Keywords: | Cc: |
Description
While most of the application correctly uses stat / S_ISREG checks, daemon/appdb.c uses the non-portable check "d_type != DT_REG" which fails on e.g. JFS. readdir(2) states
"Currently, only some file systems (among them: Btrfs, ext2, ext3, and ext4) have full support returning the file type in d_type. All applications must properly handle a return of DT_UNKNOWN."
As in the rest of the application, stat / S_ISREG checks must be used.
Change History
Note: See
TracTickets for help on using
tickets.
