mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge pull request #1716 from Salamandar/ynh_secure_remove
Fix ynh_safe_rm: check if target is not a broken symlink before erorring out.
This commit is contained in:
commit
44bbc34967
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ ynh_safe_rm() {
|
|||
|
||||
if [[ -z "$target" ]]; then
|
||||
ynh_print_warn "ynh_safe_rm called with empty argument, ignoring."
|
||||
elif [[ ! -e $target ]]; then
|
||||
elif [[ ! -e "$target" ]] && [[ ! -L "$target" ]]; then
|
||||
ynh_print_info "'$target' wasn't deleted because it doesn't exist."
|
||||
elif ! _acceptable_path_to_delete "$target"; then
|
||||
ynh_print_warn "Not deleting '$target' because it is not an acceptable path to delete."
|
||||
|
|
Loading…
Add table
Reference in a new issue