diff options
author | Max Kellermann <max@duempel.org> | 2015-02-28 20:42:50 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2015-02-28 23:00:26 +0100 |
commit | 90a61b6babe3528efd982511790057e1e1e39b81 (patch) | |
tree | cae3a8072a056118865a988042e1f1269d11e277 /src/SongUpdate.cxx | |
parent | 00583bc4a8357cf43930151650dc058225675403 (diff) | |
download | mpd-90a61b6babe3528efd982511790057e1e1e39b81.tar.gz mpd-90a61b6babe3528efd982511790057e1e1e39b81.tar.xz mpd-90a61b6babe3528efd982511790057e1e1e39b81.zip |
fs/FileInfo: new library providing GetFileInfo()
Replaces StatFile(), with a portable data object.
Diffstat (limited to '')
-rw-r--r-- | src/SongUpdate.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SongUpdate.cxx b/src/SongUpdate.cxx index 931f43e1f..6d51055c2 100644 --- a/src/SongUpdate.cxx +++ b/src/SongUpdate.cxx @@ -27,7 +27,7 @@ #include "util/Error.hxx" #include "fs/AllocatedPath.hxx" #include "fs/Traits.hxx" -#include "fs/FileSystem.hxx" +#include "fs/FileInfo.hxx" #include "decoder/DecoderList.hxx" #include "tag/Tag.hxx" #include "tag/TagBuilder.hxx" @@ -148,8 +148,8 @@ DetachedSong::Update() const AllocatedPath path_fs = AllocatedPath::FromUTF8(GetRealURI()); - struct stat st; - if (!StatFile(path_fs, st) || !S_ISREG(st.st_mode)) + FileInfo fi; + if (!GetFileInfo(path_fs, fi) || !fi.IsRegular()) return false; TagBuilder tag_builder; @@ -160,7 +160,7 @@ DetachedSong::Update() tag_scan_fallback(path_fs, &full_tag_handler, &tag_builder); - mtime = st.st_mtime; + mtime = fi.GetModificationTime(); tag_builder.Commit(tag); return true; } else if (IsRemote()) { |