1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-06 15:27:02 +01:00

Add check for valid birthTime()

This commit is contained in:
Jonas Kvinge 2019-11-13 19:10:39 +01:00
parent c23a251ec3
commit 79e7c2a1fa

View File

@ -128,7 +128,10 @@ void TagReader::ReadFile(const QString& filename,
#if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
qint64 mtime = info.lastModified().toSecsSinceEpoch();
qint64 btime = info.birthTime().toSecsSinceEpoch();
qint64 btime = mtime;
if (info.birthTime().isValid()) {
btime = info.birthTime().toSecsSinceEpoch();
}
#elif QT_VERSION >= QT_VERSION_CHECK(5, 8, 0)
qint64 mtime = info.lastModified().toSecsSinceEpoch();
qint64 btime = info.created().toSecsSinceEpoch();