From fa9cb75c9759eeda5796f502ed3405dfa165c238 Mon Sep 17 00:00:00 2001 From: genteure Date: Mon, 16 May 2022 18:27:00 +0800 Subject: [PATCH] Cli: Normalize paths --- BililiveRecorder.Cli/Program.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/BililiveRecorder.Cli/Program.cs b/BililiveRecorder.Cli/Program.cs index 01ae2b8..7f6291d 100644 --- a/BililiveRecorder.Cli/Program.cs +++ b/BililiveRecorder.Cli/Program.cs @@ -70,7 +70,7 @@ namespace BililiveRecorder.Cli private static async Task RunConfigModeAsync(RunModeArguments args) { - var path = args.Path; + var path = Path.GetFullPath(args.Path); using var logger = BuildLogger(args.LogLevel, args.LogFileLevel); Log.Logger = logger; @@ -124,13 +124,12 @@ namespace BililiveRecorder.Cli global.RecordDanmakuGift = danmaku.HasFlag(PortableModeArguments.PortableDanmakuMode.Gift); global.RecordDanmakuRaw = danmaku.HasFlag(PortableModeArguments.PortableDanmakuMode.RawData); - global.WorkDirectory = args.OutputPath; + global.WorkDirectory = Path.GetFullPath(args.OutputPath); config.Rooms = args.RoomIds.Select(x => new RoomConfig { RoomId = x, AutoRecord = true }).ToList(); } var serviceProvider = BuildServiceProvider(config, logger); - return await RunRecorderAsync(serviceProvider, args.WebBind); }