diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2005-09-25 13:49:31 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2005-09-25 13:49:31 +0200 |
commit | c3a76dfef6b62a003f159f2ec1ef0ca6d2290db7 (patch) | |
tree | 852a9b9177f3ec7c666ab4e6c01976bfcd41bf0a /tools.c | |
parent | f2183f9ff56f6f0024d9c55df6472f37f638adc0 (diff) | |
download | vdr-c3a76dfef6b62a003f159f2ec1ef0ca6d2290db7.tar.gz vdr-c3a76dfef6b62a003f159f2ec1ef0ca6d2290db7.tar.bz2 |
The '.update' file in the video directory is now touched when a recording is added or deleted
Diffstat (limited to 'tools.c')
-rw-r--r-- | tools.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.c 1.98 2005/09/11 13:11:05 kls Exp $ + * $Id: tools.c 1.99 2005/09/25 12:56:06 kls Exp $ */ #include "tools.h" @@ -17,6 +17,7 @@ #include <sys/vfs.h> #include <time.h> #include <unistd.h> +#include <utime.h> #include "i18n.h" int SysLogLevel = 3; @@ -475,6 +476,12 @@ bool SpinUpDisk(const char *FileName) return false; } +void TouchFile(const char *FileName) +{ + if (utime(FileName, NULL) == -1 && errno != ENOENT) + LOG_ERROR_STR(FileName); +} + time_t LastModifiedTime(const char *FileName) { struct stat fs; |