OmegaPhil / animecheck

Commandline CRC32, MD5 and eD2k-based hashing script also capable of reading and creating SFV and MD5 checksum files and generating eD2k links. This is an initial foray into python and github
GNU General Public License v3.0
46 stars 5 forks source link

--no-recurse doesn't work #27

Closed darealshinji closed 10 years ago

darealshinji commented 10 years ago

It seems that the --no-recurse option doesn't work for me (any longer I guess). Here's the results of some tests I've done: http://tny.cz/70d7fa79

OmegaPhil commented 10 years ago

Acknowledged - obviously the script hasn't been changed to cause the failure. Its going to take some time for me to reach this task.

darealshinji commented 10 years ago

It seems the --no-recurse limits the search up to one sub-directory instead of not looking into sub-dirs at all:

$ ./animecheck.py -n E23A63B8 animecheck.py 00000000 test/b 00000000 test/a 00000000 test/dir/c 00000000 test/dir/d $ ./animecheck.py -n --no-recurse E23A63B8 animecheck.py 00000000 test/b 00000000 test/a

Some system infos: Python 2: v2.7.5+ Python 3: v3.3.2+ OS: Mint 16 petra Kernel: x86_64 Linux 3.11.0-12-generic

OmegaPhil commented 10 years ago

Right, it does work in the way I made it - yes, it was intended to be 1 level deep, you are passing the directory to it and it doesnt make sense to just ignore it (via * being evaluated to the individual things). Hence the subdirectory thing rather than just ignoring directories thrown at it.

darealshinji commented 10 years ago

Yeah, I just realized that now. I took a look at other shell hash tools (crc32, md5sum, sha265sum) and they ignore dirs and print an error message. Maybe animecheck should do the same when using "--no-recurse"?

OmegaPhil commented 10 years ago

k, as you requested the functionality originally and there are probably no other users, I will change that to ignore any directory and output an error message.

It specifically goes against how I use animecheck, but then I won't use this flag :) And other canonical tools behave that way.

Still will need to wait till I reach it.

darealshinji commented 10 years ago

Thanks. I still have a proposal: I added "-N" as an alias for "--no-recurse". Maybe you want to do the same.

OmegaPhil commented 10 years ago

Will do.

OmegaPhil commented 10 years ago

Right, working on this now