mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-28 13:16:41 +00:00
safe_remove: remove also broken symbolic links
if the target ($1) is a symbolic link to a removed file/folder, the check will fail and the (broken) symbolic link will be not removed.
This commit is contained in:
parent
772890643e
commit
48917868a7
@ -136,7 +136,7 @@ safe_remove() {
|
|||||||
|
|
||||||
[ -z "${path}" ] && return 0
|
[ -z "${path}" ] && return 0
|
||||||
|
|
||||||
if [ -f "${path}" -o -d "${path}" ]; then
|
if [ -e "${path}" -o -L "${path}" ]; then
|
||||||
rm -r "${path}"
|
rm -r "${path}"
|
||||||
elif [ -n "${PKG_NAME}" ]; then
|
elif [ -n "${PKG_NAME}" ]; then
|
||||||
print_color CLR_WARNING "safe_remove: path does not exist: [${PKG_NAME}]: ${path}\n"
|
print_color CLR_WARNING "safe_remove: path does not exist: [${PKG_NAME}]: ${path}\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user