mirror of
https://github.com/Radarr/Radarr
synced 2025-03-11 06:33:16 +00:00
Fix problem with Radarr identifying reverse-symlinked files as new, and potentially overwriting movies as a result
parent
28a511649f
commit
c5bd7b890b
1 changed files with 9 additions and 0 deletions
|
@ -180,8 +180,17 @@ while [[ $PERMFILESIZE != $ORIGFILESIZE ]]; do
|
|||
done
|
||||
|
||||
if [[ $PERMFILESIZE == $ORIGFILESIZE ]]; then
|
||||
# Save current time stamps to prevent radarr from identifying our simlink as new, and double-processing it
|
||||
LINKDIR=$(dirname "$LINKPATH")
|
||||
FOLDER_DATE=$(date -r "$LINKDIR" +@%s.%N)
|
||||
FILE_DATE=$(date -r "$LINKPATH" +@%s.%N)
|
||||
|
||||
rm "$LINKPATH"
|
||||
ln -s "$PERMPATH" "$LINKPATH"
|
||||
|
||||
touch --no-create --no-dereference --date "$FILE_DATE" "$LINKPATH"
|
||||
touch --no-create --no-dereference --date "$FILE_DATE" "$PERMPATH"
|
||||
touch --no-create --no-dereference --date "$FOLDER_DATE" "$LINKDIR"
|
||||
fi
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue