Check path before opening image
This commit is contained in:
parent
084854d71d
commit
394d96246b
|
@ -23,8 +23,9 @@
|
|||
- [fruhnow](https://github.com/fruhnow)
|
||||
- [Lynxy](https://github.com/Lynxy)
|
||||
- [fasheng](https://github.com/fasheng)
|
||||
- [ploughpuff](https://github.com/ploughpuff)
|
||||
- [ploughpuff](https://github.com/ploughpuff)
|
||||
- [pjeanjean](https://github.com/pjeanjean)
|
||||
- [DrPandemic](https://github.com/drpandemic)
|
||||
|
||||
# Emby Contributors
|
||||
|
||||
|
|
|
@ -185,6 +185,11 @@ namespace Jellyfin.Drawing.Skia
|
|||
|
||||
public ImageDimensions GetImageSize(string path)
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
{
|
||||
throw new FileNotFoundException("File not found", path);
|
||||
}
|
||||
|
||||
using (var s = new SKFileStream(path))
|
||||
using (var codec = SKCodec.Create(s))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user