Open hamada147 opened 4 days ago
All Unix hidden files should be ignored per this: https://github.com/jellyfin/jellyfin/blob/06c603428bceccdb793eb34cc0340e25552d6c1d/Emby.Server.Implementations/Library/IgnorePatterns.cs#L83-L88
I don’t know why it does not work in docker because this does not happen with the native install on macOS, the fact that any hidden files is being scanned is weird.
This is so weird, I just compiled and ran the source code from the master branch (commit SHA: 2b0f028b6f1c471db16996a36d0d6ee6f23bde57) and it does ignore all Unix hidden files. I don't know why in the docker instance it doesn't.
I don't know why in the docker instance it doesn't.
After some investigation I found this is tricky to fix because it will change the file system enumeration quite a bit. The dotnet internal EnumerateFileSystemInfos
requires read access to each and every file in the specified path as the IgnoreInaccessible
property is not correctly handled inside the implementation: https://github.com/dotnet/runtime/blob/f1332ab0d82ee0e21ca387cbd1c8a87c5dfa4906/src/libraries/System.Private.CoreLib/src/System/IO/Enumeration/FileSystemEnumerableFactory.cs#L198
We have set the IgnoreInaccessible
property to true
in the EnumerationOptions
. However, the implementation of .NET does not attempt to catch the exception raised by the ToFileSystemInfo
call and simply throws even when IgnoreInaccessible
is set to true
. It should just silently ignore the file if an UnauthorizedAccessException
was thrown.
This issue respects the following points:
Description of the bug
On a new installation of JellyFin on a MacOS using docker, it fails to scan a folder with the MacOS file system because it is trying to read files that start with
._
and._.DS_Store
.Reproduction steps
What is the current bug behavior?
When reading a folder directory on a macOS file system, it tries to read and access all files even the ones that starts with
._
and._.DS_Store
.What is the expected correct behavior?
When reading a folder directory on a macOS file system, it should ignore all files that start with
._
and._.DS_Store
.Jellyfin Server version
10.10.0+
Specify commit id
No response
Specify unstable release number
No response
Specify version number
No response
Specify the build version
10.10.3
Environment
Jellyfin logs
FFmpeg logs
Client / Browser logs
No response
Relevant screenshots or videos
No response
Additional information
No response