adrianlopezroche / fdupes

FDUPES is a program for identifying or deleting duplicate files residing within specified directories.
2.42k stars 186 forks source link

Option to prevent recursing into Synology @eaDir metadata folders #190

Closed tonytw1 closed 2 months ago

tonytw1 commented 2 months ago

Synology NAS NFS mounts expose the internal @eaDir folders which the NAS uses to store file meta data. These metadata files create lots of unhelpful duplicates when fdupes'ing a mounted file system.

Very crude patch to prevent the build file list step from recursing into these folders. Registered in the -e / --noeadirs command line option.

Uses strdup and basename calls cribbed from the F_EXCLUDEHIDDEN branch to extract the dir name.

Work in progress; do not merge! This solved my immediate problem in the absence of a more general excluded named dir of exclude by pattern option. Offered as a draft PR incase anyone else has the same problem and wants to collaborate.

jbruchon commented 2 months ago

What happens if someone wants to dedupe a folder with that name?

jbruchon commented 2 months ago

Why should there be a special option for excluding a single directory name?

jbruchon commented 2 months ago

@tonytw1 Better yet, why not just steal the extended filter code from jdupes that already does this with a simple, -X nostr:/@eaDir? https://codeberg.org/jbruchon/jdupes/src/branch/master/extfilter.c