diff options
author | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2018-05-29 22:36:50 -0300 |
---|---|---|
committer | Michael Alexsander Silva Dias <michaelalexsander@protonmail.com> | 2018-05-30 11:31:29 -0300 |
commit | cf9520ba2e8d2e966a842b5df66a4e6454c870ce (patch) | |
tree | 576d91a013a2805ebad1c3223a36f8645feb46c0 | |
parent | 28fa82c2defacca8ccad5c26022d2eeaee925f4f (diff) |
Don't add a period to a log file name if it has no extension.
-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) { |