TagReaderTagLib: Touch file over saving cover art

This commit is contained in:
Jonas Kvinge 2023-03-26 22:37:21 +02:00
parent 49384ce294
commit 2b9e7db924
1 changed files with 9 additions and 1 deletions

View File

@ -1356,7 +1356,15 @@ bool TagReaderTagLib::SaveEmbeddedArt(const spb::tagreader::SaveEmbeddedArtReque
// Not supported.
else return false;
return fileref.file()->save();
const bool result = fileref.file()->save();
#ifdef Q_OS_LINUX
if (result) {
// Linux: inotify doesn't seem to notice the change to the file unless we change the timestamps as well. (this is what touch does)
utimensat(0, QFile::encodeName(filename).constData(), nullptr, 0);
}
#endif // Q_OS_LINUX
return result;
}