diff options
author | Max Kellermann <max@musicpd.org> | 2017-02-11 23:08:55 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-08-18 12:16:43 +0200 |
commit | 902fbb33471b07c3ab9bf62d13927f2db46e35f5 (patch) | |
tree | 6a85b281f1ba869b0a7a1bb429bc1d117d76d51b /src/db/update | |
parent | 9f16c798d02d23bccbf463b78bfb228ccc666e11 (diff) |
db/LightDirectory: use std::chrono::system_clock::time_point
Diffstat (limited to 'src/db/update')
-rw-r--r-- | src/db/update/Archive.cxx | 4 | ||||
-rw-r--r-- | src/db/update/Container.cxx | 4 | ||||
-rw-r--r-- | src/db/update/Walk.cxx | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/db/update/Archive.cxx b/src/db/update/Archive.cxx index d6fb77d21..6004ed835 100644 --- a/src/db/update/Archive.cxx +++ b/src/db/update/Archive.cxx @@ -137,7 +137,7 @@ UpdateWalk::UpdateArchiveFile(Directory &parent, const char *name, { Directory *directory = LockFindChild(parent, name); - if (directory != nullptr && directory->mtime == std::chrono::system_clock::to_time_t(info.mtime) && + if (directory != nullptr && directory->mtime == info.mtime && !walk_discard) /* MPD has already scanned the archive, and it hasn't changed since - don't consider updating it */ @@ -173,7 +173,7 @@ UpdateWalk::UpdateArchiveFile(Directory &parent, const char *name, directory->device = DEVICE_INARCHIVE; } - directory->mtime = std::chrono::system_clock::to_time_t(info.mtime); + directory->mtime = info.mtime; UpdateArchiveVisitor visitor(*this, *file, directory); file->Visit(visitor); diff --git a/src/db/update/Container.cxx b/src/db/update/Container.cxx index 6069b172b..5d96b84d9 100644 --- a/src/db/update/Container.cxx +++ b/src/db/update/Container.cxx @@ -43,7 +43,7 @@ UpdateWalk::MakeDirectoryIfModified(Directory &parent, const char *name, if (directory->IsMount()) return nullptr; - if (directory->mtime == std::chrono::system_clock::to_time_t(info.mtime) && !walk_discard) { + if (directory->mtime == info.mtime && !walk_discard) { /* not modified */ return nullptr; } @@ -53,7 +53,7 @@ UpdateWalk::MakeDirectoryIfModified(Directory &parent, const char *name, } directory = parent.MakeChild(name); - directory->mtime = std::chrono::system_clock::to_time_t(info.mtime); + directory->mtime = info.mtime; return directory; } diff --git a/src/db/update/Walk.cxx b/src/db/update/Walk.cxx index b18cda30f..c3af3f789 100644 --- a/src/db/update/Walk.cxx +++ b/src/db/update/Walk.cxx @@ -382,7 +382,7 @@ UpdateWalk::UpdateDirectory(Directory &directory, UpdateDirectoryChild(directory, child_exclude_list, name_utf8, info2); } - directory.mtime = std::chrono::system_clock::to_time_t(info.mtime); + directory.mtime = info.mtime; return true; } |