mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix null dereference when file does not exist
Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>
This commit is contained in:
parent
5ebbd2b565
commit
a39baa1b50
@ -202,9 +202,10 @@ public class ThumbnailsManager(
|
|||||||
public async Task SetUserImage(Guid userId, Stream? image)
|
public async Task SetUserImage(Guid userId, Stream? image)
|
||||||
{
|
{
|
||||||
var filePath = $"/metadata/user/{userId}.webp";
|
var filePath = $"/metadata/user/{userId}.webp";
|
||||||
if (image == null && await storage.DoesExist(filePath))
|
if (image == null)
|
||||||
{
|
{
|
||||||
await storage.Delete(filePath);
|
if (await storage.DoesExist(filePath))
|
||||||
|
await storage.Delete(filePath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user