]> granicus.if.org Git - fcron/commitdiff
bug fix : use tmp_str and not the static string ".tmp"
authorthib <thib>
Sat, 26 Feb 2005 15:15:10 +0000 (15:15 +0000)
committerthib <thib>
Sat, 26 Feb 2005 15:15:10 +0000 (15:15 +0000)
save.c

diff --git a/save.c b/save.c
index 272a449cb159ac98c3928eab21b31028f00c2bd3..998097899d0fce4ac1226afebf2d05683a084b87 100644 (file)
--- 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 ) {