mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-27 10:58:44 +01:00
This commit is contained in:
@@ -85,9 +85,17 @@ namespace Emby.Server.Implementations.Serialization
|
|||||||
/// <returns>System.Object.</returns>
|
/// <returns>System.Object.</returns>
|
||||||
public object? DeserializeFromFile(Type type, string file)
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user