mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 19:37:55 +02:00
Don't let permission denied kill library scans
I have a single `./Movies` directory that contains symlinks to many other directories, some of which are in shared paths. Other daemons sometimes overwrite permissions on these paths and prevent Jellyfin from being able to scan. Because this exception is unhandled within a LINQ statement it can randomly kill the metadata refresh for my entire Movies library. Running with this patch has allowed me to at least add + scan for movies in directories that Jellyfin can currently access and gives me some notification of the symlinks failing due to permissions errors. (cherry picked from commit 193cc8690a60bc2a432df14d256f00371e055c90)
This commit is contained in:
parent
5a9afb0874
commit
e67d8ce077
1 changed files with 4 additions and 0 deletions
|
@ -262,6 +262,10 @@ namespace Emby.Server.Implementations.IO
|
||||||
_logger.LogError(ex, "Reading the file size of the symlink at {Path} failed. Marking the file as not existing.", fileInfo.FullName);
|
_logger.LogError(ex, "Reading the file size of the symlink at {Path} failed. Marking the file as not existing.", fileInfo.FullName);
|
||||||
result.Exists = false;
|
result.Exists = false;
|
||||||
}
|
}
|
||||||
|
catch (UnauthorizedAccessException ex)
|
||||||
|
{
|
||||||
|
_logger.LogError(ex, "Reading the file at {Path} failed due to a permissions exception.", fileInfo.FullName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue