Skip to content

Commit

Permalink
analizators/s1848
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhorukovAnton committed Dec 30, 2021
1 parent 1c29b81 commit 6c32e34
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions products/ASC.CRM/Server/Classes/ContactPhotoManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,11 @@ public void DeletePhoto(int contactID, bool isTmpDir, string tmpDirName, bool re

lock (locker)
{
_resizeQueue.GetTasks<ResizeWorkerItem>().Where(item => item.ContactID == contactID)
.All(item =>
{
_resizeQueue.RemoveTask(item.Id);
return true;
});

foreach(var item in _resizeQueue.GetTasks<ResizeWorkerItem>().Where(item => item.ContactID == contactID))
{
_resizeQueue.RemoveTask(item.Id);
}

var photoDirectory = !isTmpDir
? BuildFileDirectory(contactID)
: (String.IsNullOrEmpty(tmpDirName) ? BuildFileTmpDirectory(contactID) : BuildFileTmpDirectory(tmpDirName));
Expand Down

0 comments on commit 6c32e34

Please sign in to comment.