mirror of
https://github.com/zoriya/Kyoo.git
synced 2026-06-04 04:17:13 +00:00
Fix null dereference when file does not exist
Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>
This commit is contained in:
@@ -202,9 +202,10 @@ public class ThumbnailsManager(
|
||||
public async Task SetUserImage(Guid userId, Stream? image)
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user