mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-08-04 15:28:23 +00:00
This commit is contained in:
parent
fc6419685c
commit
893188ab28
1 changed files with 10 additions and 2 deletions
|
|
@ -85,9 +85,17 @@ namespace Emby.Server.Implementations.Serialization
|
|||
/// <returns>System.Object.</returns>
|
||||
public object? DeserializeFromFile(Type type, string file)
|
||||
{
|
||||
using (var stream = File.OpenRead(file))
|
||||
try
|
||||
{
|
||||
return DeserializeFromStream(type, stream);
|
||||
using (var stream = File.OpenRead(file))
|
||||
{
|
||||
return DeserializeFromStream(type, stream);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ex.Data.Add("Filename", file);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue