I’m having this exact same issue and it only started happening recently. Nzbget v19.0-testing-r1929 on Ubuntu 16.04 with mono 188.8.131.52. Nzbget is calling nzbtonzbdrone script as well. The file is successfully moved to the destination folder after the script is called; however, the file cleanup operation never takes though and the original file remains as well. If I to to the history tab and select that same file in question and then select to post-process it from there the operation runs as expected. The cleanup operation only successfully takes place after post-processing this way (from the history tab) but not after the script is run the first time after a successful download.
Looks like it isn’t playing nicely with mono. From the debug logs:
17-4-12 23:06:04.1|Debug|EpisodeFileMovingService|Hardlinking episode file: /home/nzbget/downloads/dst/tv/Archer.2009.S08E02.720p.HDTV.x264-AVS/Archer.2009.S08E02.720p.HDTV.x264-AVS.mkv to /media/venus/tv/Archer (2009)/Season 8/Archer (2009) - S08E02 - Archer Dreamland- Bernice HDTV-720p.mkv
17-4-12 23:06:04.1|Debug|DiskTransferService|HardLinkOrCopy [/home/nzbget/downloads/dst/tv/Archer.2009.S08E02.720p.HDTV.x264-AVS/Archer.2009.S08E02.720p.HDTV.x264-AVS.mkv] > [/media/venus/tv/Archer (2009)/Season 8/Archer (2009) - S08E02 - Archer Dreamland- Bernice HDTV-720p.mkv]
17-4-12 23:06:04.1|Debug|DiskProvider|Hardlink ‘/home/nzbget/downloads/dst/tv/Archer.2009.S08E02.720p.HDTV.x264-AVS/Archer.2009.S08E02.720p.HDTV.x264-AVS.mkv’ to ‘/media/venus/tv/Archer (2009)/Season 8/Archer (2009) - S08E02 - Archer Dreamland- Bernice HDTV-720p.mkv’ failed.
[v184.108.40.20689] Mono.Unix.UnixIOException: Invalid cross-device link [EXDEV].
at Mono.Unix.UnixMarshal.ThrowExceptionForLastError () [0x00005] in :0
at Mono.Unix.UnixMarshal.ThrowExceptionForLastErrorIf (System.Int32 retval) [0x00007] in :0
at Mono.Unix.UnixFileSystemInfo.CreateLink (System.String path) [0x0000d] in :0
at NzbDrone.Mono.Disk.DiskProvider.TryCreateHardLink (System.String source, System.String destination) [0x00006] in :0