From: thib Date: Sat, 26 Feb 2005 15:15:10 +0000 (+0000) Subject: bug fix : use tmp_str and not the static string ".tmp" X-Git-Tag: ver2_9_6~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3158d793a609dca94cfae7b16c9a1875ac7ca6fb;p=fcron bug fix : use tmp_str and not the static string ".tmp" --- diff --git a/save.c b/save.c index 272a449..9980978 100644 --- a/save.c +++ b/save.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* $Id: save.c,v 1.8 2004-01-29 10:34:55 thib Exp $ */ + /* $Id: save.c,v 1.9 2005-02-26 15:15:10 thib Exp $ */ #include "global.h" #include "save.h" @@ -349,7 +349,7 @@ save_file_safe(cf_t *file, char *final_path, char *prog_name, uid_t own_uid, strncpy(temp_path, final_path, sizeof(temp_path)-sizeof(tmp_str)); temp_path_index = ( final_path_len > sizeof(temp_path)-sizeof(tmp_str) ) ? sizeof(temp_path)-sizeof(tmp_str) : final_path_len; - strcpy(&temp_path[temp_path_index], ".tmp"); + strcpy(&temp_path[temp_path_index], tmp_str); if ( save_one_file(file, temp_path, own_uid, own_gid, save_date) == OK ) { if ( rename(temp_path, final_path) != 0 ) {