1
0
Fork 0
mirror of https://github.com/Radarr/Radarr synced 2024-12-23 00:12:44 +00:00

PathEquals is used for MoveEpisodeFile.

Cleanup will log an error if it fails to alter the DB.
This commit is contained in:
Mark McDowall 2011-12-14 17:26:22 -08:00
parent a7a7c4ab49
commit 1c06ee2a01

View file

@ -176,7 +176,7 @@ public virtual bool MoveEpisodeFile(EpisodeFile episodeFile, bool newDownload =
var newFile = _mediaFileProvider.CalculateFilePath(series, episodes.First().SeasonNumber, newFileName, Path.GetExtension(episodeFile.Path));
//Only rename if existing and new filenames don't match
if (episodeFile.Path == newFile.FullName)
if (DiskProvider.PathEquals(episodeFile.Path, newFile.FullName))
{
Logger.Debug("Skipping file rename, source and destination are the same: {0}", episodeFile.Path);
return false;
@ -243,7 +243,8 @@ public virtual void CleanUp(IList<EpisodeFile> files)
}
catch (Exception ex)
{
Logger.WarnException(ex.Message, ex);
var message = String.Format("Unable to cleanup EpisodeFile in DB: {0}", episodeFile.EpisodeFileId);
Logger.ErrorException(message, ex);
}
}
}