From 90a61b6babe3528efd982511790057e1e1e39b81 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 28 Feb 2015 20:42:50 +0100 Subject: fs/FileInfo: new library providing GetFileInfo() Replaces StatFile(), with a portable data object. --- src/SongUpdate.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/SongUpdate.cxx') 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()) { -- cgit v1.2.3