--adopt and --dotfiles do not work together

Barabas Raffai <[email protected]> Sun, 14 Feb 2021 12:48:51 +0000
Newsgroups gmane.comp.gnu.stow.bugs
Message-ID <CAL7EBT7Lwt1X+_X9Sy3SZHnGQ2fwVg244zSOQJ3Zt3MUhfza0Q@mail.gmail.com>
Hi,

When using --adopt and --dotfiles together, files are not adopted correctly.

Steps to reproduce:

    touch .dotfiles-test
    mkdir test
    cd test
    mkdir test
    touch test/dot-dotfiles-test
    stow -n --adopt --dotfiles -v test

This results in the following print:

    MV: .dotfiles-test -> test/test/.dotfiles-test
    LINK: .dotfiles-test => test/test/dot-dotfiles-test
    WARNING: in simulation mode so not modifying filesystem.

The file is moved to .dotfiles-test and the link is to
dot-dotfiles-test. These are two different files, and the result is
that the original file is no longer used.

Best Regards,
Barabas