Skip to content

Conversation

gnattu
Copy link
Member

@gnattu gnattu commented Jan 18, 2025

Our GetFileSystemEntries method will throw when enumerating the file system, but its callers might consider the unhandled exceptions as the whole path is not available. This would cause a single problematic file to fail the enumeration, and could lead to unexpected side effects.

HandleIOException gracefully by marking the files throwing as not exist to let the caller skip that file.

Note that the dotnet's method EnumerateFileSystemInfos may also throw and failed to build the file list. We can do little in this case. See #13093 for more info for this kind of issue.

Changes

Issues

Fixes #13389

Our `GetFileSystemEntries` method will throw when enumerating the file system, but its callers might consider the unhandled exceptions as the whole path is not available. This would cause a single problematic file to fail the enumeration, and could lead to unexpected side effects.

HandleIOException gracefully by marking the files throwing as not exist to let the caller skip that file.
@gnattu gnattu requested a review from a team January 18, 2025 16:46
@gnattu gnattu added the stable backport Backport into the next stable release label Jan 18, 2025
@joshuaboniface joshuaboniface merged commit 3766a88 into jellyfin:release-10.10.z Jan 22, 2025
15 of 16 checks passed
Bond-009 pushed a commit that referenced this pull request Feb 3, 2025
Catch IOExceptions for GetFileSystemMetadata

Original-merge: 3766a88

Merged-by: joshuaboniface <joshua@boniface.me>

Backported-by: Bond_009 <bond.009@outlook.com>
@jellyfin-bot jellyfin-bot removed the stable backport Backport into the next stable release label Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants