Skip to content

Commit 7c6c19a

Browse files
committed
cleanup DecodeService
1 parent 0e71221 commit 7c6c19a

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/dsstats.decode/DecodeService.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,8 +146,10 @@ public async Task Decode()
146146

147147
try
148148
{
149-
var replayPaths = Directory.GetFiles(decodeSettings.Value.ReplayFolders.ToDo, "*SC2Replay");
150-
replayPaths = replayPaths.Except(excludeReplays).ToArray();
149+
var replayPaths = Directory.GetFiles(decodeSettings.Value.ReplayFolders.ToDo, "*SC2Replay")
150+
.Where(f => !File.Exists(f + ".tmp"))
151+
.Where(f => !excludeReplays.Contains(f))
152+
.ToArray();
151153

152154
if (replayPaths.Length == 0)
153155
{
@@ -251,8 +253,10 @@ public async Task DecodeRaw()
251253

252254
try
253255
{
254-
var replayPaths = Directory.GetFiles(Path.Combine(decodeSettings.Value.ReplayFolders.ToDoRaw), "*SC2Replay");
255-
replayPaths = replayPaths.Except(excludeReplays).ToArray();
256+
var replayPaths = Directory.GetFiles(Path.Combine(decodeSettings.Value.ReplayFolders.ToDoRaw), "*SC2Replay")
257+
.Where(f => !File.Exists(f + ".tmp"))
258+
.Where(f => !excludeReplays.Contains(f))
259+
.ToArray();
256260

257261
if (replayPaths.Length == 0)
258262
{

0 commit comments

Comments
 (0)