irclog core module: rename old logs when switching from dir to file
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 10 Aug 2008 12:42:11 +0000 (14:42 +0200)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 10 Aug 2008 12:45:18 +0000 (14:45 +0200)
commit9fcb32ca8058384a4bb91d748fcbd1f81378734d
tree4eb3b1a25a0c3e2e7d96a863e44649bb55cc5922
parente4f33c1ea92b56b09c6e58514c73b9a65bf09922
irclog core module: rename old logs when switching from dir to file

It may happen that a user changes from an irclog.filename_format where
some components are files to a format where they are directories (e.g.
from '%%{where}' to '%%{where}/%Y') or conversely. In this case, we
rename the existing file/dir by appending '.old.atime' to it (atime is
the actual file/dir access time).
lib/rbot/core/irclog.rb