You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//Semaphore is required because of possible race condition between multiple threads
155
+
await_duplicateNamesCheckSemaphore.WaitAsync();
156
+
157
+
intcount=-1;
158
+
try
159
+
{
160
+
if(_fileCountDict.ContainsKey(key))
161
+
_fileCountDict[key]++;
162
+
else
163
+
_fileCountDict[key]=0;
164
+
165
+
166
+
count=_fileCountDict[key];
167
+
}
168
+
finally
169
+
{
170
+
_duplicateNamesCheckSemaphore.Release();
171
+
}
151
172
152
-
if(_fileCountDict[key]>1)
173
+
if(count>1)
153
174
{
154
175
_logger.Warn($"Found more than a single file with the name {filename} in the same folder in post {crawledUrl.PostId}, sequential number will be appended to its name.");
0 commit comments