Merge pull request #1648 from whatdoineed2do/library-overwrite-db-entry-fix

This commit is contained in:
ejurgensen 2023-09-01 17:06:44 +02:00 committed by GitHub
commit 9d092c983b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1323,6 +1323,12 @@ process_inotify_file(struct watch_info *wi, char *path, struct inotify_event *ie
{
DPRINTF(E_DBG, L_SCAN, "File moved to: %s\n", path);
/* handle overwriting an existing file, no inotify event generated for the
* overwrite on existing file before we update the path of moved file
*/
db_file_delete_bypath(path);
cache_artwork_delete_by_path(path);
ret = db_file_enable_bycookie(ie->cookie, path, filename_from_path(path));
if (ret > 0)