diff options
-rw-r--r-- | core/io/logger.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/io/logger.cpp b/core/io/logger.cpp index 983b829d8d..8a5d683b56 100644 --- a/core/io/logger.cpp +++ b/core/io/logger.cpp @@ -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) { |