1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

[iOS] Fix build with warnings=extra.

(cherry picked from commit 987723b386)
This commit is contained in:
bruvzg
2022-10-31 11:45:32 +02:00
committed by Rémi Verschelde
parent 0fd48f02f5
commit d368b55a53
8 changed files with 65 additions and 5 deletions

View File

@@ -32,6 +32,7 @@
#include "core/os/dir_access.h"
#include "core/os/os.h"
#include "core/os/time.h"
#include "core/print_string.h"
#include "core/project_settings.h"
@@ -169,11 +170,7 @@ void RotatedFileLogger::rotate_file() {
if (FileAccess::exists(base_path)) {
if (max_files > 1) {
char timestamp[21];
OS::Date date = OS::get_singleton()->get_date();
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 timestamp = Time::get_singleton()->get_datetime_string_from_system().replace(":", ".");
String backup_name = base_path.get_basename() + timestamp;
if (base_path.get_extension() != String()) {
backup_name += "." + base_path.get_extension();