From aa2f00bceabed6af2cbd0dc280872df1ad2de021 Mon Sep 17 00:00:00 2001 From: satbaby Date: Thu, 3 May 2012 19:49:54 +0200 Subject: [PATCH] xmlutil.cpp:use rename instead of cp --- src/eitd/xmlutil.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/eitd/xmlutil.cpp b/src/eitd/xmlutil.cpp index 7a2e58eb1..57d321067 100644 --- a/src/eitd/xmlutil.cpp +++ b/src/eitd/xmlutil.cpp @@ -421,12 +421,12 @@ static void write_indexxml_footer(FILE *fd) fprintf(fd, "\n"); } -void cp(char * from, char * to) -{ - char cmd[256]; - snprintf(cmd, 256, "cp -f %s %s", from, to); - system(cmd); -} +// void cp(char * from, char * to) +// { +// char cmd[256]; +// snprintf(cmd, 256, "cp -f %s %s", from, to); +// system(cmd); +// } void writeEventsToFile(char *epgdir) { @@ -484,7 +484,7 @@ _done: sprintf(filename, "%s/index.xml", epgdir); - cp(tmpname, filename); + rename(tmpname, filename); unlink(tmpname); return ;