]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Remember to close() the coverart directory file when finished iterating through it...
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 21 Mar 2022 22:12:35 +0000 (09:12 +1100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 21 Mar 2022 22:12:35 +0000 (09:12 +1100)
metadata_hub.c

index a899574ad0bcae79c269f761fe81edf112a196a2..4d21de52255e99cc4370041288347affb4663520 100644 (file)
@@ -298,8 +298,11 @@ char *metadata_write_image_file(const char *buf, int len) {
                   }
                 }
               }
+              if (close(dir_fd) < 0)
+                debug(1, "Error %d closing directory \"%s\"", errno, config.cover_art_cache_dir);
             } else {
-              debug(1, "Can't open the directory for deletion.");
+              debug(1, "Can't open the directory \"%s\" for deletion -- error %d.",
+                    config.cover_art_cache_dir, errno);
             }
             free(full_filename);
             closedir(d);