[System.ComponentModel.Composition.Import]
public IPithosSettings Settings { get; set; }
+ private List<string> _selectivePaths = new List<string>();
+ public List<string> SelectivePaths
+ {
+ get { return _selectivePaths; }
+ set { _selectivePaths = value; }
+ }
public WorkflowAgent()
{
var pendingStates = pendingEntries
.Select(state => new WorkflowState(account, state))
.ToList();
-
+
+
if (Log.IsDebugEnabled)
Log.DebugFormat("Found {0} interrupted files", pendingStates.Count);
return;*/
//TODO: Need to handle folder renames
+ //If there are selective sync paths defined
+ if (SelectivePaths.Count > 0
+ //And the target file is not below any of the selective paths
+ && !SelectivePaths.Any(workflowState.Path.IsAtOrDirectlyBelow))
+ //abort the post
+ {
+ Log.InfoFormat("File skipped, not under a selected folder [{0}] ",workflowState.Path);
+ return;
+ }
+
+
Debug.Assert(workflowState.Path.StartsWith(workflowState.AccountInfo.AccountPath, StringComparison.InvariantCultureIgnoreCase), "File from wrong account posted");
_agent.Post(workflowState);