Merge pull request #19261 from YeldhamDev/logger_period_fix

Don't add a period to a log file name if it has no extension
This commit is contained in:
Rémi Verschelde 2018-05-30 22:33:42 +02:00 committed by GitHub
commit bc66b5c619
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {