Cli: Normalize paths

This commit is contained in:
genteure 2022-05-16 18:27:00 +08:00
parent 6b9b077a52
commit fa9cb75c97

View File

@ -70,7 +70,7 @@ namespace BililiveRecorder.Cli
private static async Task<int> 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);
}