summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-05-30 22:33:42 +0200
committerGitHub <noreply@github.com>2018-05-30 22:33:42 +0200
commitbc66b5c619af337d31e7271d5b5157eb25240e8d (patch)
treed06012b8cca6e9c9ba01ab947edb72226ebf80d3 /core
parent65fc525ed8d5b801279b73bc864b4d6290f5da3e (diff)
parentcf9520ba2e8d2e966a842b5df66a4e6454c870ce (diff)
Merge pull request #19261 from YeldhamDev/logger_period_fix
Don't add a period to a log file name if it has no extension
Diffstat (limited to 'core')
-rw-r--r--core/io/logger.cpp5
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) {