mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 23:42:58 +02:00
xmlutil.cpp:use rename instead of cp
This commit is contained in:
@@ -421,12 +421,12 @@ static void write_indexxml_footer(FILE *fd)
|
|||||||
fprintf(fd, "</dvbepgfiles>\n");
|
fprintf(fd, "</dvbepgfiles>\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
void cp(char * from, char * to)
|
// void cp(char * from, char * to)
|
||||||
{
|
// {
|
||||||
char cmd[256];
|
// char cmd[256];
|
||||||
snprintf(cmd, 256, "cp -f %s %s", from, to);
|
// snprintf(cmd, 256, "cp -f %s %s", from, to);
|
||||||
system(cmd);
|
// system(cmd);
|
||||||
}
|
// }
|
||||||
|
|
||||||
void writeEventsToFile(char *epgdir)
|
void writeEventsToFile(char *epgdir)
|
||||||
{
|
{
|
||||||
@@ -484,7 +484,7 @@ _done:
|
|||||||
|
|
||||||
sprintf(filename, "%s/index.xml", epgdir);
|
sprintf(filename, "%s/index.xml", epgdir);
|
||||||
|
|
||||||
cp(tmpname, filename);
|
rename(tmpname, filename);
|
||||||
unlink(tmpname);
|
unlink(tmpname);
|
||||||
|
|
||||||
return ;
|
return ;
|
||||||
|
Reference in New Issue
Block a user