Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alternatives: --keep-foreign incorrectly handles non-existent files
Normally alternatives will only refuse to create a link to /etc/alternatives/* if the file already exists and is not a symlink. But alternatives never checked if existing symlink goes to /etc/alternatives/. This is a weird behavior, but we did not want to change the default behavior so we added --keep-foreign option that is more strict and checks that the target if the symlink is in /etc/alternatives/. But we missed the corner-case where there is no file at all and incorrectly reported on error. Fixes #102 (cherry picked from commit bd9b6cc)
- Loading branch information