birkenfeld / fddf

Fast data dupe finder
Apache License 2.0
109 stars 9 forks source link

error: no method named `ino` found for type `walkdir::DirEntry` in the current scope #3

Closed Boscop closed 7 years ago

Boscop commented 7 years ago
error[E0599]: no method named `ino` found for type `walkdir::DirEntry` in the current scope
   --> C:\Users\me\.cargo\registry\src\github.com-1ecc6299db9ec823\fddf-1.3.0\src\main.rs:260:68
    |
260 |                                         if inodes.insert(dir_entry.ino())
{
    |                                                                    ^^^

error: aborting due to previous error(s)
birkenfeld commented 7 years ago

Thanks for the report. Is this on Windows? I'll have to make this check conditional...

Boscop commented 7 years ago

Yes, on Windows. Btw, maybe you can use this: https://doc.rust-lang.org/std/path/struct.Path.html#method.symlink_metadata path.symlink_metadata()?.file_type().is_symlink() and get the target with path.canonicalize().

birkenfeld commented 7 years ago

Well, the point here is to avoid counting two or more hardlinked files as duplicates.

On Windows hardlinks, while possible, are pretty uncommon, so I don't think it'll matter to leave out this check there.

Boscop commented 7 years ago

But maybe it's still useful for Windows soft symlinks?

birkenfeld commented 7 years ago

walkdir is already supposed to ignore symlinks with follow_links(false).