summaryrefslogtreecommitdiff
path: root/tools.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2005-09-25 13:49:31 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2005-09-25 13:49:31 +0200
commitc3a76dfef6b62a003f159f2ec1ef0ca6d2290db7 (patch)
tree852a9b9177f3ec7c666ab4e6c01976bfcd41bf0a /tools.c
parentf2183f9ff56f6f0024d9c55df6472f37f638adc0 (diff)
downloadvdr-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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools.c b/tools.c
index 28b2bbed..dbd78c97 100644
--- a/tools.c
+++ b/tools.c
@@ -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;