Closed Emstar closed 1 year ago
In thinking about this more, a flag to skip processing unrecognized files might be good enough, and probably easier to implement.
Anyway, thanks again, about to let 'er rip!
I don't think a list of extensions to ignore would be too complex. filepath.Ext()
seems like it would do the job well, then just loop over the provided extensions in the config.
While we're at it - what about skipping hidden directories and files? I have a few macOS cruft that takes a few seconds to error on: .AppleDB/, .AppleDesktop/, .DSStore, ..DS_Store, .apdisk.
It looks like most of the files I want to skip are actually hidden files too--at least when viewed in Windows Explorer.
Hidden files are interesting. The UNIX/Linux method of "hiding" a file is to prepend a .
to the start of a file name. In windows land the check would require using a syscall.GetFileAttributes()
call. This would require build constraints to pull in the right logic for the OS build in question. It's definitely possible, but it's a bit messy. Will look around for a more elegant solution.
@Emstar @clunkclunk if either of you have go installed and use windows... would you mind pulling down the 1.2.0 branch and test the hidden files on windows? I've confirmed it works for Linux already.
@aetaric Sadly I don't have Go but I'll keep testing binaries.
checkrr-1.2.0-beta.zip @Emstar well, in that case, I built it for windows via cross-compile.
@aetaric I'll try to check it out today. Windows Defender nuked it, said it's a virus, so I will have to fight it first, haha.
Ah yes, the joys of windows.
I was able to confirm this works via a Windows VM. I'll go ahead and close this out since the code seems to work as expected if you still want to mess around with it feel free, but 1.2.0 seems to be right around the corner.
I didn't get to it in time, appreciate it! Looking forward to 1.2.0.
Hey @aetaric sorry for the dumb question, but what is the yaml config file syntax for the new ignoreExt
option? I see it is a string array like checkpath
but I'm not doing something right.
Should look a bit like this:
ignoreexts:
- .txt
- .nfo
- .DS_Store
Weird... I am doing it right, but it really looks like the directive is not being used. I'll open a new issue to keep things tidy and hopefully I am just making a dumb mistake.
This is a great utility, thank you for releasing it.
In my tests I noticed that the scanner will add .ini files to the list of bad files. It might be nice if there was a way to skip scanning of specific file types. In a mixed OS environment there are various legit non-media files that may end up scattered around the media directories, and they clutter the list of bad files.