Don't add a period to a log file name if it has no extension.
This commit is contained in:
parent
28fa82c2de
commit
cf9520ba2e
1 changed files with 4 additions and 1 deletions
|
@ -152,7 +152,10 @@ void RotatedFileLogger::rotate_file() {
|
|||
OS::Time time = OS::get_singleton()->get_time();
|
||||
sprintf(timestamp, "-%04d-%02d-%02d-%02d-%02d-%02d", date.year, date.month, date.day, time.hour, time.min, time.sec);
|
||||
|
||||
String backup_name = base_path.get_basename() + timestamp + "." + base_path.get_extension();
|
||||
String backup_name = base_path.get_basename() + timestamp;
|
||||
if (base_path.get_extension() != String()) {
|
||||
backup_name += "." + base_path.get_extension();
|
||||
}
|
||||
|
||||
DirAccess *da = DirAccess::open(base_path.get_base_dir());
|
||||
if (da) {
|
||||
|
|
Loading…
Reference in a new issue