Linux/Mono - Win32 IO Exception When Importing Show

Hello,

I am currently running version 2.0.0.2150 because I was experiencing the bug fixed by commit f776aae2c06f5d33c0a66cddd30ffc0a1c3cdd17 Fixed: Mono returning a drive with an empty path causing disk space check to fail. The update fixed the problem, but now when nzbdrone tries to import newly downloaded files I get the exception below. I have tried both mono 3.6.0 and 3.10.0 and it happens with both.

Any help you be greatly appreciated.

Message Couldn't import episode /media/downloads/factory/The.Big.Bang.Theory.S08E06.The.Expedition.Approximation.720p.HDTV.DD5.1.x264-CtrlHD/WwgbFF1tgNkPr83qw.mkv: Win32 IO returned ERROR_ALREADY_EXISTS. Path:

Exception
System.IO.IOException: Win32 IO returned ERROR_ALREADY_EXISTS. Path:
at System.IO.File.Move (System.String sourceFileName, System.String destFileName) [0x0013a] in /root/mono-3.6.0/mcs/class/corlib/System.IO/File.cs:319
at NzbDrone.Common.Disk.DiskProviderBase.MoveFile (System.String source, System.String destination, Boolean overwrite) [0x000c7] in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Common\Disk\DiskProviderBase.cs:259
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List1 episodes, System.String destinationFilename, Boolean copyOnly) [0x001db] in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:126 at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x00050] in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeFileMovingService.cs:66 at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, Boolean copyOnly) [0x00119] in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\UpgradeMediaFileService.cs:65 at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List1 decisions, Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem) [0x0022c] in m:\BuildAgent\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:89

Could you take a screenshot of your naming settings? The error is stating a file with the same name as its importing to exists.

Hi Markus,

Thanks for getting back to me. I figured out what the issue was. Initially the files were read only, so they were copied over instead of moved. For some reason the nzbdrone library did not update after the copy, so the show did not show up as imported even though the file was there. I subsequently recognized the permission problem and made the file writable. Since nzbdrone had not updated the library yet, it was trying to move the file to the correct location, but the copied file was already there hence the ERROR_ALREADY_EXISTS error.