1
0
mirror of https://github.com/billz/raspap-webgui.git synced 2025-07-07 15:07:41 +02:00

Update plugin_helper.sh

This commit is contained in:
Bill Zimmerman 2025-03-20 18:50:02 +01:00 committed by GitHub
parent 605486feda
commit 71f1132bc8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -71,15 +71,9 @@ case "$action" in
exit 1
fi
dest_dir="$(dirname "$destination")"
if [ -z "$dest_dir" ] || [ "$dest_dir" = "/" ]; then
echo "Error: Unsafe destination path."
exit 1
fi
mkdir -p "$dest_dir"
chown -R "$raspap_user:$raspap_user" "$dest_dir"
mkdir -p "$(dirname "$destination")"
cp "$source" "$destination"
chown -R $raspap_user:$raspap_user "$destination"
echo "OK"
;;