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; } );