chaos / scrub

disk overwrite utility
GNU General Public License v2.0
70 stars 21 forks source link

scrub should work for symlinks pointing to block devices #20

Closed sergio-correia closed 3 years ago

sergio-correia commented 3 years ago

In [1] (add -L option to avoid scrubbing symlink target [Tim Boronczyk]), scrub introduced a -L (--no-link) option so that it would not scrub the target, if it was a link and this new option was set.

A side-effect of that change is that scrub stopped working for links pointing to a block device, whereas it would still work for links pointing to regular files -- it is not clear from the commit changelog and the added documentation for this new option that this was an intended change.

In this commit we fix this regression, and scrub works again for links pointing to block devices. -L/--no-link option also works for these links.

Resolves: #19

[1] https://github.com/chaos/scrub/commit/01915c442288b4b274261fa07e42e116fb9d6b60

sergio-correia commented 3 years ago

Thanks, @garlick, I have rebased it.

garlick commented 3 years ago

Thanks!