jvirkki / dupd

CLI utility to find duplicate files
http://www.virkki.com/dupd
GNU General Public License v3.0
112 stars 16 forks source link

Fix DIRENT_HAS_TYPE to work on filesystems that don't support it #9

Closed jbruchon closed 8 years ago

jbruchon commented 8 years ago

This bug bit me hard on XFS; every file was seen as "not a file" because XFS returns d_type of DT_UNKNOWN instead of DT_REG since XFS doesn't cache the type in a way that readdir() can retrieve "for free." This fix allows for fallback to stat() when d_type returns something dupd can't use and restores normal behavior.

jvirkki commented 8 years ago

Cool, thanks! I have never run on XFS.