inotify: fix SQL error when moving captions
Change INSERT to INSERT OR REPLACE when recording caption file moves, to avoid UNIQUE constraint failures.
This commit is contained in:
@ -149,7 +149,7 @@ check_for_captions(const char *path, int64_t detailID)
|
||||
|
||||
if (ret == 0)
|
||||
{
|
||||
sql_exec(db, "INSERT into CAPTIONS"
|
||||
sql_exec(db, "INSERT OR REPLACE into CAPTIONS"
|
||||
" (ID, PATH) "
|
||||
"VALUES"
|
||||
" (%lld, %Q)", detailID, file);
|
||||
|
Reference in New Issue
Block a user