birkenfeld / fddf

Fast data dupe finder
Apache License 2.0
114 stars 7 forks source link

Check zero length files #12

Closed manfredlotz closed 6 years ago

manfredlotz commented 6 years ago

What do you think about checking zero size files as well and only omit zero size files if, for example,

-n Exclude zero-length files

is specified when calling fddf?

birkenfeld commented 6 years ago

Well, you can already use -m0 to set the minimum size.

manfredlotz commented 6 years ago

I know. But I like -m0 as sort of default and thus an extra option to exclude zero files

birkenfeld commented 6 years ago

I'm not a fan. Zero length files are not something you want to deduplicate in my experience.

manfredlotz commented 6 years ago

I'm often in a situation where I like to know duplicate zero length files.

Perhaps something different could be done. Let the behavior as it is now.

But add the possibility to check for an environment variable, say FDDF_INCLUDE_ZERO_LENGTH_FILES (or whatever name). If it is defined then change fddf's behavior accordingly.

birkenfeld commented 6 years ago

Still, I don't know why this is necessary, it doesn't seem any more convenient than just adding -m0 to the command line.

manfredlotz commented 6 years ago

In comparison to an option like -n or so, I agree, it saves only one character of typing. But as a separate option it would be more obvious how zero length files are handled.

My alternate idea to have an environment variable enables fddf to operate in two different 'default modes' depending upon its setting.

birkenfeld commented 6 years ago

I'll add a note to the help text to make it more obvious. But otherwise, I don't think I want to change something here.