FileAlreadyExists on broken symlinks

All your suggestions, requests and ideas for future development
Post Reply
Kai23
Posts: 5
Joined: 01 Mar 2015, 11:01

FileAlreadyExists on broken symlinks

Post by Kai23 »

Hello everyone

I have a medialibrary, and this symlink exists, but is broken :

Code: Select all

/medialibrary/Movies/Action ou Vérité (2018)/Action ou Vérité (2018).mkv
I created a simple `fetch.sh` which is exactly like this :

Code: Select all

#!/bin/bash

export JAVA_OPTS="-Xmx256m -Dsun.io.useCanonCaches=false -Dsun.io.useCanonPrefixCache=false"

/home/flo/utils/rename/test/filebot.sh --lang fr -script fn:amc --output "/medialibrary" --log-file "/home/flo/utils/rename/amc.log" --action symlink --conflict override -non-strict --def plex=localhost:yx4sR1jmsBGjcJyYRE39 --def music=n artwork=n "ut_dir=$1" "ut_kind=multi" minFileSize=0
And when I use it this way :

Code: Select all

/home/flo/utils/rename/test/fetch.sh /downloads/Truth\ or\ Dare\ \(2018\)\ VF2-ENG\ AC3\ BluRay\ 1080p\ x264.GHT.mkv
It fails.

here is the log :

Code: Select all

Locking /home/flo/utils/rename/amc.log
Run script [fn:amc] at [Sat Sep 01 20:21:12 CEST 2018]
Parameter: plex = *****
Parameter: music = n
Parameter: artwork = n
Parameter: ut_dir = /downloads/Truth or Dare (2018) VF2-ENG AC3 BluRay 1080p x264.GHT.mkv
Parameter: ut_kind = multi
Parameter: minFileSize = 0
Input: /downloads/Truth or Dare (2018) VF2-ENG AC3 BluRay 1080p x264.GHT.mkv
Group: [mov:truth or dare 2018] => [Truth or Dare (2018) VF2-ENG AC3 BluRay 1080p x264.GHT.mkv]
Rename movies using [TheMovieDB]
Auto-detect movie from context: [/downloads/Truth or Dare (2018) VF2-ENG AC3 BluRay 1080p x264.GHT.mkv]
[SYMLINK] from [/downloads/Truth or Dare (2018) VF2-ENG AC3 BluRay 1080p x264.GHT.mkv] to [/medialibrary/Movies/Action ou Vérité (2018)/Action ou Vérité (2018).mkv]
[SYMLINK] Failure: java.nio.file.FileAlreadyExistsException: /medialibrary/Movies/Action ou Vérité (2018)/Action ou Vérité (2018).mkv
Processed 0 files
FileAlreadyExistsException: /medialibrary/Movies/Action ou Vérité (2018)/Action ou Vérité (2018).mkv
Finished without processing any files
Failure (°_°)

And the sysinfos :

Code: Select all

./filebot.sh -script fn:sysinfo                                                                                                                  1 ↵
FileBot 4.8.2 (r5789)
JNA Native: 5.2.2
MediaInfo: 18.05
7-Zip-JBinding: 9.20
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, No such file or directory
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-08-14 (r534)
Groovy: 2.5.1
JRE: OpenJDK Runtime Environment 1.8.0_181
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 8 Core / 6 GB Max Memory / 20 MB Used Memory
OS: Linux (amd64)
HW: Linux aircotyovh 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
DATA: /home/flo/utils/rename/test/data/flo
Package: TAR
License: FileBot License P4416584 (Valid-Until: 2019-09-01)
Could you please help me ?

Thanks
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileAlreadyExists on broken symlinks

Post by rednoah »

Strange. No idea why --conflict override doesn't kick in for broken symlinks.

You could probably just delete all the broken symlinks first:
https://stackoverflow.com/questions/220 ... ith-a-line


EDIT:

Maybe fixed with r5849. You can run update-filebot.sh to give it a try.
:idea: Please read the FAQ and How to Request Help.
Kai23
Posts: 5
Joined: 01 Mar 2015, 11:01

Re: FileAlreadyExists on broken symlinks

Post by Kai23 »

Yay, it works now, thank you !
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: FileAlreadyExists on broken symlinks

Post by rednoah »

Thanks for confirming. The change will be part of the next release then.
:idea: Please read the FAQ and How to Request Help.
Post Reply