From ca5886719c4e1dee32ab348ac0dd85ebf8b94de6 Mon Sep 17 00:00:00 2001 From: stan Date: Wed, 13 Feb 2008 22:48:47 +0000 Subject: [PATCH] Creates id tag file in both storage methods git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@2307 e3e1d417-86f3-4887-817a-d78f3d33393f --- src/zm_event.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/zm_event.cpp b/src/zm_event.cpp index a806cbdf8..abd52a98a 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -131,6 +131,13 @@ Event::Event( Monitor *p_monitor, struct timeval p_start_time, const char *p_cau Error(( "Can't mkdir %s: %s", path, strerror(errno))); } } + char id_file[PATH_MAX]; + // Create empty id tag file + snprintf( id_file, sizeof(id_file), "%s/.%d", path, id ); + if ( FILE *id_fp = fopen( id_file, "w" ) ) + fclose( id_fp ); + else + Fatal(( "Can't fopen %s: %s", id_file, strerror(errno))); } last_db_frame = 0; }