From 9a74f8ca15ca0434b23fbc0156472948e86a216c Mon Sep 17 00:00:00 2001 From: Marc Hernandez Date: Sat, 4 Nov 2023 12:32:23 -0700 Subject: [PATCH] x) fix file separators --- logging/Log.cs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/logging/Log.cs b/logging/Log.cs index 74e6b68..8012f68 100644 --- a/logging/Log.cs +++ b/logging/Log.cs @@ -66,10 +66,16 @@ static public class log cat = autoCat; } else - { - var pathPieces = path.Split( '\\' ); - - var lastDir = pathPieces[ pathPieces.Length - 2 ]; + { + var pathPieces = path.Split( '\\' ); + + if(pathPieces.Length < 2) + { + pathPieces = path.Split('/'); + } + + + var lastDir = pathPieces[ pathPieces.Length - 2 ]; ImmutableInterlocked.AddOrUpdate( ref s_shortname, pathHash, lastDir, ( key, value ) => { return lastDir; } );