Revision add4f744
b/trunk/Pithos.Core/Agents/NetworkAgent.cs | ||
---|---|---|
531 | 531 |
|
532 | 532 |
//Get the list of server objects changed since the last check |
533 | 533 |
//The name of the container is passed as state in order to create a dictionary of tasks in a subsequent step |
534 |
var listObjects = from container in containers |
|
534 |
var listObjects = (from container in containers
|
|
535 | 535 |
select Task<IList<ObjectInfo>>.Factory.StartNew(_ => |
536 |
client.ListObjects(accountInfo.UserName,container.Name, since),container.Name); |
|
537 |
|
|
536 |
client.ListObjects(accountInfo.UserName,container.Name, since),container.Name)).ToList(); |
|
538 | 537 |
|
538 |
var listShared = Task<IList<ObjectInfo>>.Factory.StartNew(_ => client.ListSharedObjects(since), "shared"); |
|
539 |
listObjects.Add(listShared); |
|
539 | 540 |
var listTasks = await Task.Factory.WhenAll(listObjects.ToArray()); |
540 | 541 |
|
541 | 542 |
using (log4net.ThreadContext.Stacks["SCHEDULE"].Push("Process Results")) |
... | ... | |
577 | 578 |
// SOLUTION 2: Mark conflict and ask the user as in #1 |
578 | 579 |
|
579 | 580 |
var trashObjects = dict["trash"].Result; |
580 |
//var sharedObjects = ((Task<IList<ObjectInfo>>) task.Result[2]).Result;
|
|
581 |
var sharedObjects = dict["shared"].Result;
|
|
581 | 582 |
|
582 | 583 |
//Items with the same name, hash may be both in the container and the trash |
583 | 584 |
//Don't delete items that exist in the container |
... | ... | |
589 | 590 |
ProcessTrashedFiles(accountInfo, realTrash); |
590 | 591 |
|
591 | 592 |
|
592 |
var cleanRemotes = (from info in remoteObjects |
|
593 |
//.Union(sharedObjects) |
|
593 |
var cleanRemotes = (from info in remoteObjects.Union(sharedObjects) |
|
594 | 594 |
let name = info.Name |
595 | 595 |
where !name.EndsWith(".ignore", StringComparison.InvariantCultureIgnoreCase) && |
596 | 596 |
!name.StartsWith(FolderConstants.CacheFolder + "/", |
Also available in: Unified diff