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:
parent
7e581cdc9a
commit
55aa09e9c2
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue