hardlinkpy
hardlinkpy copied to clipboard
Simplify dry-run tests in hardlink_files()
Rather than having multiple levels of "if not options.dry-run" checks in hardlink_files(), intertwined with tricky system code and error handling, I think it's much easier to simply perform the dry-run check once at the top, and skip over all the system code and try/except chains. It also makes this fairly critical code section safer to maintain, imo.