Revision 4147814e trunk/Pithos.Core/PithosMonitor.cs
b/trunk/Pithos.Core/PithosMonitor.cs | ||
---|---|---|
483 | 483 |
|
484 | 484 |
FileAgent.SelectivePaths=selectivePaths; |
485 | 485 |
PollAgent.SetSyncUris(uris); |
486 |
|
|
486 |
|
|
487 | 487 |
var removedPaths = UrisToFilePaths(removed); |
488 |
RemoveSelectivePaths(removedPaths); |
|
488 |
UnversionSelectivePaths(removedPaths); |
|
489 |
|
|
490 |
} |
|
491 |
|
|
492 |
/// <summary> |
|
493 |
/// Mark all unselected paths as Unversioned |
|
494 |
/// </summary> |
|
495 |
/// <param name="removed"></param> |
|
496 |
private void UnversionSelectivePaths(List<string> removed) |
|
497 |
{ |
|
498 |
if (removed == null) |
|
499 |
return; |
|
489 | 500 |
|
501 |
//Ensure we remove any file state below the deleted folders |
|
502 |
FileState.UnversionPaths(removed); |
|
490 | 503 |
} |
491 | 504 |
|
505 |
|
|
492 | 506 |
/// <summary> |
493 | 507 |
/// Return a list of absolute filepaths from a list of Uris |
494 | 508 |
/// </summary> |
... | ... | |
507 | 521 |
select Path.Combine(RootPath, relativePath.After(_accountInfo.UserName + '\\'))).ToList(); |
508 | 522 |
} |
509 | 523 |
|
510 |
/// <summary> |
|
511 |
/// Delete the folders that were removed from synchronization |
|
512 |
/// </summary> |
|
513 |
/// <param name="removed"></param> |
|
514 |
private void RemoveSelectivePaths(List<string> removed) |
|
515 |
{ |
|
516 |
if (removed == null) |
|
517 |
return; |
|
518 |
|
|
519 |
foreach (var removedPath in removed.Where(Directory.Exists)) |
|
520 |
{ |
|
521 |
try |
|
522 |
{ |
|
523 |
Directory.Delete(removedPath, true); |
|
524 |
} |
|
525 |
catch { } |
|
526 |
} |
|
527 |
|
|
528 |
//Ensure we remove any file state below the deleted folders |
|
529 |
FileState.RemovePaths(removed); |
|
530 |
} |
|
531 | 524 |
|
532 | 525 |
public ObjectInfo GetObjectInfo(string filePath) |
533 | 526 |
{ |
Also available in: Unified diff