------------------------------------------------------------ revno: 12427 revision-id: squid3@treenet.co.nz-20121227023332-qp533ypw2chjel5c parent: squid3@treenet.co.nz-20121227023136-68c45bxxtwudylhh fixes bug(s): http://bugs.squid-cache.org/show_bug.cgi?id=3712 author: Markus Rietzler committer: Amos Jeffries branch nick: 3.3 timestamp: Wed 2012-12-26 19:33:32 -0700 message: Bug 3712: Rotating logs overwrites the previous log ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: squid3@treenet.co.nz-20121227023332-qp533ypw2chjel5c # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # testament_sha1: af8a9a21c4d059e2df3dc8c9d0af511490591c4f # timestamp: 2012-12-27 02:38:15 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.3 # base_revision_id: squid3@treenet.co.nz-20121227023136-\ # 68c45bxxtwudylhh # # Begin patch === modified file 'helpers/log_daemon/file/log_file_daemon.cc' --- helpers/log_daemon/file/log_file_daemon.cc 2012-11-24 03:41:34 +0000 +++ helpers/log_daemon/file/log_file_daemon.cc 2012-12-27 02:33:32 +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) {