1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/transmission_ynh.git synced 2024-09-04 01:46:12 +02:00

Fix upgrade script for old versions (#102)

We moved from /home/yunohost.transmission to /home/yunohost.app/transmission.
Dangling symlinks might exist in the $MEDIA_DIRECTORY...

Removing this before ynh_multimedia_build_main_dir will fix this, and the symlinks will be recreated after by ynh_multimedia_addfolder.

Also, we're using rm and not ynh_secure_remove because of https://github.com/YunoHost/issues/issues/2253
This commit is contained in:
Salamandar 2023-09-28 11:21:19 +02:00 committed by GitHub
parent 7e581cdc9a
commit 55aa09e9c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -79,6 +79,11 @@ fi
#================================================= #=================================================
ynh_script_progression --message="Adding multimedia directories..." --weight=3 ynh_script_progression --message="Adding multimedia directories..." --weight=3
# Remove possibly dangling symlinks created before the /home/yunohost.transmission -> /home/yunohost.app/transmission transition
# Use rm because ynh_secure_remove fails on dangling symlinks, see https://github.com/YunoHost/issues/issues/2253...
rm "$MEDIA_DIRECTORY/share/Torrents"
rm "$MEDIA_DIRECTORY/share/Torrent to download"
ynh_multimedia_build_main_dir ynh_multimedia_build_main_dir
# Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move) # Set rights on transmission directory (parent need to be readable by other, and progress need to be writable by multimedia. Because files will move)