<commit_before>diff --git a/albumart.c b/albumart.c
index 057899e..d417588 100644
--- a/albumart.c
+++ b/albumart.c
@@ -348,8 +348,12 @@ find_album_art(const char *path, uint8_t *image_data, int image_size)
 	struct stat st;
 	char *album_art = NULL;
 	char *album_art_cache = check_embedded_art(path, image_data, image_size);
-	if (album_art_cache == NULL) album_art_cache = check_for_album_file(path, &album_art);
-	if (album_art_cache == NULL || lstat(album_art, &st) != 0) return 0;
+	if (album_art_cache == NULL)
+	{
+		album_art_cache = check_for_album_file(path, &album_art);
+		if (album_art_cache == NULL || lstat(album_art, &st) != 0) return 0;
+	} else
+		if (lstat(album_art_cache, &st) != 0) return 0
 <commit_msg>Fixed embedded album art patch<commit_after>diff --git a/albumart.c b/albumart.c
index 057899e..0785d9c 100644
--- a/albumart.c
+++ b/albumart.c
@@ -348,8 +348,12 @@ find_album_art(const char *path, uint8_t *image_data, int image_size)
 	struct stat st;
 	char *album_art = NULL;
 	char *album_art_cache = check_embedded_art(path, image_data, image_size);
-	if (album_art_cache == NULL) album_art_cache = check_for_album_file(path, &album_art);
-	if (album_art_cache == NULL || lstat(album_art, &st) != 0) return 0;
+	if (album_art_cache == NULL)
+	{
+		album_art_cache = check_for_album_file(path, &album_art);
+		if (album_art_cache == NULL || lstat(album_art, &st) != 0) return 0;
+	} else
+		if (lstat(album_art_cache, &st) != 0) return 0;
 
{'fraction_non_alphanumeric': 0.15013586956521738, 'fraction_numerical': 0.04551630434782609, 'mean_word_length': 5.061728395061729, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4547798', 'n_tokens_mistral': 653, 'n_tokens_neox': 596, 'n_words': 132}