aspiers / stow

GNU Stow - mirror of savannah git repository occasionally with more bleeding-edge branches
http://www.gnu.org/s/stow/
GNU General Public License v3.0
589 stars 41 forks source link

fix dotfile "dot-" directory handling bug #33 and #56727 #90

Closed Yoris1 closed 3 months ago

Yoris1 commented 2 years ago

fix GitHub bug #33 and GNU #56727 by attempting to restore target $path with regex if it doesn't exist. Might slightly slow the process down, as it's now checking the directory twice every single stow_contents() call, but it's the least intrusive fix i could come up with.

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.06%) to 86.374% when pulling 0d43819ba9bc8239a271352a6196c0f5aa0a8520 on Yoris1:master into 4ef5eca4a9d107b24e712bb4c2c91f47e7e0fb85 on aspiers:master.

rYR79435 commented 2 years ago

Duplicate of #70?

Yoris1 commented 2 years ago

Duplicate of #70?

Yeah, it appears that #70 already solved this issue way before me, for some reason the PR didn't show up under #33 when I was looking into the issue. I feel like my fix is simpler as it only adds 6 simple lines of code, without changing much, but it is regex and a bit of an inefficient patch so #70 might be the better choice in the end.

aspiers commented 3 months ago

Superseded by #70 and #107. Nevertheless, thanks very much indeed for your contribution which did help me in formulating the final solution!