From 59f4b20f64f374ffed4f4317536eb2191cbbdfe2 Mon Sep 17 00:00:00 2001 From: Konstantin Gindemit Date: Sun, 26 Nov 2023 17:02:42 +0100 Subject: [PATCH] ~ Fixing the logger path if it does not contain the trailing slash, then it is added to the folder path. --- .../Assets/LottiePlugin/Runtime/src/LottieAnimation.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/unity/RLottieUnity/Assets/LottiePlugin/Runtime/src/LottieAnimation.cs b/unity/RLottieUnity/Assets/LottiePlugin/Runtime/src/LottieAnimation.cs index 82d5cab..e5b4564 100644 --- a/unity/RLottieUnity/Assets/LottiePlugin/Runtime/src/LottieAnimation.cs +++ b/unity/RLottieUnity/Assets/LottiePlugin/Runtime/src/LottieAnimation.cs @@ -1,5 +1,6 @@ using LottiePlugin.Utility; using System; +using System.IO; using System.Runtime.InteropServices; using Unity.Collections; using Unity.Collections.LowLevel.Unsafe; @@ -165,6 +166,10 @@ public static void InitializeLogger(string logDirectoryPath, string logFileName, { return; } + if (!logDirectoryPath.EndsWith(Path.DirectorySeparatorChar.ToString(), StringComparison.Ordinal)) + { + logDirectoryPath += Path.DirectorySeparatorChar; + } NativeBridge.InitializeLogger(logDirectoryPath, logFileName, logFileRollSizeMB); sLoggerInitialized = true; }