Add check for valid birthTime()

This commit is contained in:
Jonas Kvinge 2019-11-13 19:10:39 +01:00
parent c23a251ec3
commit 79e7c2a1fa
1 changed files with 4 additions and 1 deletions

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();