[PR #13390] [MERGED] Catch IOExceptions for GetFileSystemMetadata #13554

Closed
opened 2026-02-07 07:15:01 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/13390
Author: @gnattu
Created: 1/18/2025
Status: Merged
Merged: 1/23/2025
Merged by: @joshuaboniface

Base: release-10.10.zHead: catch-ioexception


📝 Commits (1)

  • 1a7c229 Catch IOExceptions for GetFileSystemMetadata

📊 Changes

1 file changed (+10 additions, -0 deletions)

View changed files

📝 Emby.Server.Implementations/IO/ManagedFileSystem.cs (+10 -0)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/13390 **Author:** [@gnattu](https://github.com/gnattu) **Created:** 1/18/2025 **Status:** ✅ Merged **Merged:** 1/23/2025 **Merged by:** [@joshuaboniface](https://github.com/joshuaboniface) **Base:** `release-10.10.z` ← **Head:** `catch-ioexception` --- ### 📝 Commits (1) - [`1a7c229`](https://github.com/jellyfin/jellyfin/commit/1a7c2299c6d6b7d973ac73af9f116ca51b941ca7) Catch IOExceptions for GetFileSystemMetadata ### 📊 Changes **1 file changed** (+10 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `Emby.Server.Implementations/IO/ManagedFileSystem.cs` (+10 -0) </details> ### 📄 Description 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. <!-- Ensure your title is short, descriptive, and in the imperative mood (Fix X, Change Y, instead of Fixed X, Changed Y). For a good inspiration of what to write in commit messages and PRs please review https://chris.beams.io/posts/git-commit/ and our documentation. --> **Changes** <!-- Describe your changes here in 1-5 sentences. --> **Issues** <!-- Tag any issues that this PR solves here. ex. Fixes # --> Fixes #13389 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 07:15:01 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#13554