mirror of
https://github.com/Readarr/Readarr
synced 2026-05-05 19:20:27 +02:00
Fixed: Issue sorting downloads non-Windows NAS
This commit is contained in:
parent
a26840fb60
commit
f40305cb04
1 changed files with 10 additions and 2 deletions
|
|
@ -197,8 +197,16 @@ public virtual EpisodeFile MoveEpisodeFile(EpisodeFile episodeFile, bool newDown
|
||||||
|
|
||||||
Logger.Debug("Moving [{0}] > [{1}]", episodeFile.Path, newFile.FullName);
|
Logger.Debug("Moving [{0}] > [{1}]", episodeFile.Path, newFile.FullName);
|
||||||
_diskProvider.MoveFile(episodeFile.Path, newFile.FullName);
|
_diskProvider.MoveFile(episodeFile.Path, newFile.FullName);
|
||||||
|
|
||||||
_diskProvider.InheritFolderPermissions(newFile.FullName);
|
//Wrapped in Try/Catch to prevent this from causing issues with remote NAS boxes, the move worked, which is more important.
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_diskProvider.InheritFolderPermissions(newFile.FullName);
|
||||||
|
}
|
||||||
|
catch (UnauthorizedAccessException ex)
|
||||||
|
{
|
||||||
|
Logger.Debug("Unable to apply folder permissions to: ", newFile.FullName);
|
||||||
|
}
|
||||||
|
|
||||||
episodeFile.Path = newFile.FullName;
|
episodeFile.Path = newFile.FullName;
|
||||||
_mediaFileProvider.Update(episodeFile);
|
_mediaFileProvider.Update(episodeFile);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue