diff options
author | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-05-30 20:46:50 +0000 |
---|---|---|
committer | Sascha Volkenandt <sascha (at) akv-soft (dot) de> | 2007-05-30 20:46:50 +0000 |
commit | cebbfde9870f8c6a099d880fa40ad3738101c5d5 (patch) | |
tree | d05003cd7c4a76b5823ee9aec419247cd3770e69 /filecache.cpp | |
parent | 4bf3e6211b2483c9d6b14c3e6d9f2da142bb9ad5 (diff) | |
download | vdr-plugin-live-cebbfde9870f8c6a099d880fa40ad3738101c5d5.tar.gz vdr-plugin-live-cebbfde9870f8c6a099d880fa40ad3738101c5d5.tar.bz2 |
- return real timestamp
Diffstat (limited to 'filecache.cpp')
-rw-r--r-- | filecache.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/filecache.cpp b/filecache.cpp index a5912d0..9a21647 100644 --- a/filecache.cpp +++ b/filecache.cpp @@ -1,13 +1,17 @@ #include <algorithm> #include <fstream> #include <istream> +#include <sys/stat.h> #include "filecache.h" namespace vdrlive { std::time_t FileObject::get_filetime( std::string const& path ) { - return 9999; + struct stat sbuf; + if ( stat( path.c_str(), &sbuf ) < 0 ) + return 0; // XXX + return sbuf.st_ctime; } bool FileObject::is_current() const |