mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 09:51:02 +01:00
Fix Jellyfin legacy symlink handling
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
|
## 10.11.4-1 (07-12-2025)
|
||||||
|
- Avoid deleting the configured data directory when it matches the legacy path while rebuilding symlinks.
|
||||||
|
|
||||||
## breaking_versions: 10.11.4 (06-12-2025)
|
## breaking_versions: 10.11.4 (06-12-2025)
|
||||||
- Minor bugs fixed
|
- Minor bugs fixed
|
||||||
|
|
||||||
|
|||||||
@@ -125,5 +125,5 @@ schema:
|
|||||||
slug: jellyfin
|
slug: jellyfin
|
||||||
udev: true
|
udev: true
|
||||||
url: https://github.com/alexbelgium/hassio-addons
|
url: https://github.com/alexbelgium/hassio-addons
|
||||||
version: "10.11.4"
|
version: "10.11.4-1"
|
||||||
video: true
|
video: true
|
||||||
|
|||||||
@@ -10,9 +10,21 @@ create_link() {
|
|||||||
local target_dir="$1"
|
local target_dir="$1"
|
||||||
local link_path="$2"
|
local link_path="$2"
|
||||||
|
|
||||||
|
local target_real
|
||||||
|
local link_real
|
||||||
|
|
||||||
|
target_real=$(realpath -m "$target_dir")
|
||||||
|
link_real=$(realpath -m "$link_path")
|
||||||
|
|
||||||
mkdir -p "$target_dir"
|
mkdir -p "$target_dir"
|
||||||
mkdir -p "$(dirname "$link_path")"
|
mkdir -p "$(dirname "$link_path")"
|
||||||
|
|
||||||
|
# If the link path is the same as the target, just ensure ownership and exit
|
||||||
|
if [ "$target_real" = "$link_real" ]; then
|
||||||
|
chown -R "$PUID:$PGID" "$target_dir"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -L "$link_path" ]; then
|
if [ -L "$link_path" ]; then
|
||||||
rm "$link_path"
|
rm "$link_path"
|
||||||
elif [ -d "$link_path" ]; then
|
elif [ -d "$link_path" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user