diff --git a/charts/other/myprecious/templates/configmaps/configmap-zurg-config.yaml b/charts/other/myprecious/templates/configmaps/configmap-zurg-config.yaml index 6640d4180..85225a0fd 100644 --- a/charts/other/myprecious/templates/configmaps/configmap-zurg-config.yaml +++ b/charts/other/myprecious/templates/configmaps/configmap-zurg-config.yaml @@ -100,19 +100,21 @@ data: modified_arg="$zurg_mount/$arg" echo "Detected update on: $arg" echo "Absolute path: $modified_arg" + # remove any backslashes from the path + abs_path=$(echo "$modified_arg" | sed 's/\\//g') ##### START Added by ElfHosted for auto DMM symlinking ### - echo "Symlinking $modified_arg to /storage/symlinks/real-debrid-blackhole/$arg" + echo "Symlinking $abs_path to /storage/symlinks/real-debrid-blackhole/$arg" # Ensure blackhole exists mkdir -p /storage/symlinks/real-debrid-blackhole/movies mkdir -p /storage/symlinks/real-debrid-blackhole/shows # Copy to the RD blackhole, preserving the directory structure - cp -rs "$modified_arg/"* "/storage/symlinks/real-debrid-blackhole/$(echo $arg | cut -f1 -d/)/" + cp -rsv "$abs_path"/ "/storage/symlinks/real-debrid-blackhole/$(echo $arg | cut -f1 -d/)/" ##### END Added by ElfHosted for auto DMM symlinking ### - encoded_arg=$(echo -n "$modified_arg" | python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.stdin.read()))") + encoded_arg=$(echo -n "$abs_path" | python3 -c "import sys, urllib.parse as ul; print (ul.quote_plus(sys.stdin.read()))") if [ -z "$encoded_arg" ]; then echo "Error: Encoded argument is empty. Check the input or encoding process."