summaryrefslogtreecommitdiff
path: root/src/db/update
diff options
context:
space:
mode:
Diffstat (limited to 'src/db/update')
-rw-r--r--src/db/update/Container.cxx2
-rw-r--r--src/db/update/UpdateSong.cxx6
2 files changed, 3 insertions, 5 deletions
diff --git a/src/db/update/Container.cxx b/src/db/update/Container.cxx
index 5d96b84d9..fc4ec416c 100644
--- a/src/db/update/Container.cxx
+++ b/src/db/update/Container.cxx
@@ -107,7 +107,7 @@ UpdateWalk::UpdateContainerFile(Directory &directory,
*contdir);
// shouldn't be necessary but it's there..
- song->mtime = std::chrono::system_clock::to_time_t(info.mtime);
+ song->mtime = info.mtime;
FormatDefault(update_domain, "added %s/%s",
contdir->GetPath(), song->uri);
diff --git a/src/db/update/UpdateSong.cxx b/src/db/update/UpdateSong.cxx
index 6d3802069..599cd5cc9 100644
--- a/src/db/update/UpdateSong.cxx
+++ b/src/db/update/UpdateSong.cxx
@@ -51,9 +51,7 @@ UpdateWalk::UpdateSongFile2(Directory &directory,
return;
}
- if (!(song != nullptr &&
- std::chrono::system_clock::to_time_t(info.mtime) == song->mtime &&
- !walk_discard) &&
+ if (!(song != nullptr && info.mtime == song->mtime && !walk_discard) &&
UpdateContainerFile(directory, name, suffix, info)) {
if (song != nullptr)
editor.LockDeleteSong(directory, song);
@@ -80,7 +78,7 @@ UpdateWalk::UpdateSongFile2(Directory &directory,
modified = true;
FormatDefault(update_domain, "added %s/%s",
directory.GetPath(), name);
- } else if (std::chrono::system_clock::to_time_t(info.mtime) != song->mtime || walk_discard) {
+ } else if (info.mtime != song->mtime || walk_discard) {
FormatDefault(update_domain, "updating %s/%s",
directory.GetPath(), name);
if (!song->UpdateFile(storage)) {