Fix replay recording temporary paths not supporting subdirectories (#19887)
This commit is contained in:
@@ -72,13 +72,14 @@ public sealed partial class GameTicker
|
||||
if (data.State is not ReplayRecordState state)
|
||||
return;
|
||||
|
||||
if (state.MoveToPath != null)
|
||||
{
|
||||
_sawmillReplays.Info($"Moving replay into final position: {state.MoveToPath}");
|
||||
if (state.MoveToPath == null)
|
||||
return;
|
||||
|
||||
_taskManager.BlockWaitOnTask(_replays.WaitWriteTasks());
|
||||
data.Directory.Rename(data.Path, state.MoveToPath.Value);
|
||||
}
|
||||
_sawmillReplays.Info($"Moving replay into final position: {state.MoveToPath}");
|
||||
_taskManager.BlockWaitOnTask(_replays.WaitWriteTasks());
|
||||
DebugTools.Assert(!_replays.IsWriting());
|
||||
data.Directory.CreateDir(state.MoveToPath.Value.Directory);
|
||||
data.Directory.Rename(data.Path, state.MoveToPath.Value);
|
||||
}
|
||||
|
||||
private ResPath GetAutoReplayPath()
|
||||
|
||||
Reference in New Issue
Block a user