Blacklist complains if url pattern does not match any files

Easier to debug stuff
This commit is contained in:
blowfish 2019-03-01 01:03:45 -08:00
parent 91ec3c8341
commit 2a8287491b
2 changed files with 5 additions and 0 deletions

View File

@ -57,10 +57,15 @@ namespace Restock
string lineBeforeComment = line.Split(COMMENT_SEPARATOR, 2, StringSplitOptions.None)[0].Trim(); string lineBeforeComment = line.Split(COMMENT_SEPARATOR, 2, StringSplitOptions.None)[0].Trim();
if (lineBeforeComment == string.Empty) continue; if (lineBeforeComment == string.Empty) continue;
bool matchedFile = false;
foreach (UrlDir.UrlFile urlFile in FindFilesForUrl(lineBeforeComment, dir)) foreach (UrlDir.UrlFile urlFile in FindFilesForUrl(lineBeforeComment, dir))
{ {
yield return urlFile; yield return urlFile;
matchedFile = true;
} }
if (!matchedFile)
Debug.LogError($"[Restock] No files found matching url {lineBeforeComment}");
} }
} }