------------------------------------------------------------ revno: 11740 revision-id: squid3@treenet.co.nz-20121227025857-5jmdf97iilvs7k8t parent: squid3@treenet.co.nz-20121210095241-nawf0n40aws1gx2a fixes bug(s): http://bugs.squid-cache.org/show_bug.cgi?id=3712 author: Markus Rietzler committer: Amos Jeffries branch nick: 3.2 timestamp: Wed 2012-12-26 19:58:57 -0700 message: Bug 3712: Rotating logs overwrites the previous log ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121227025857-5jmdf97iilvs7k8t # target_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # testament_sha1: 97f542a9a9c542efbe1ce9f1a1a36ea80552a30a # timestamp: 2012-12-27 03:01:54 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/branches\ # /SQUID_3_2 # base_revision_id: squid3@treenet.co.nz-20121210095241-\ # nawf0n40aws1gx2a # # Begin patch === modified file 'helpers/log_daemon/file/log_file_daemon.cc' --- helpers/log_daemon/file/log_file_daemon.cc 2012-11-29 11:20:58 +0000 +++ helpers/log_daemon/file/log_file_daemon.cc 2012-12-27 02:58:57 +0000 @@ -61,8 +61,8 @@ fprintf(stderr, "WARNING: remove '%s' failure: %s\n", to, xstrerror()); } #endif - if (rename(path, to) < 0 && errno != ENOENT) { - fprintf(stderr, "WARNING: rename '%s' to '%s' failure: %s\n", path, to, xstrerror()); + if (rename(from, to) < 0 && errno != ENOENT) { + fprintf(stderr, "WARNING: rename '%s' to '%s' failure: %s\n", from, to, xstrerror()); } } if (rotate_count > 0) {