aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNP-Hardass <np.hardass@gmail.com>2017-04-05 22:06:20 -0400
committerNP-Hardass <np.hardass@gmail.com>2017-04-05 22:06:20 -0400
commit67a44d0df1b0fc165104da3deefa10501ec2e9cc (patch)
tree1b6e482727d5b742361efcf34903663263f96734
parentwine.eselect: Fix bad logicc in are_symlinks_valid for bin (diff)
downloadeselect-wine-67a44d0df1b0fc165104da3deefa10501ec2e9cc.tar.gz
eselect-wine-67a44d0df1b0fc165104da3deefa10501ec2e9cc.tar.bz2
eselect-wine-67a44d0df1b0fc165104da3deefa10501ec2e9cc.zip
wine.eselect: Handle symlinks that have been deleted
-rw-r--r--wine.eselect10
1 files changed, 7 insertions, 3 deletions
diff --git a/wine.eselect b/wine.eselect
index 44ece59..f25ef0c 100644
--- a/wine.eselect
+++ b/wine.eselect
@@ -732,10 +732,14 @@ remove_symlinks() {
die -q "Missing listing of ${var} symlinks"
fi
for symlink in ${symlinks[@]}; do
- if [[ ! -L "${symlink}" ]]; then
- die -q "${symlink} is not a symlink."
+ if [[ -e "${symlink}" ]]; then
+ if [[ ! -L "${symlink}" ]]; then
+ die -q "${symlink} is not a symlink."
+ fi
+ rm "${symlink}" || die "Failed to rm ${symlink}"
+ else
+ write_warning_msg "${symlink} symlink was missing."
fi
- rm "${symlink}" || die "Failed to rm ${symlink}"
# remove entry from config file
symlinks=$(list_rm_item "${symlink}" "${symlinks}")