Modifications to enable Sync Pausing for all operations
[pithos-ms-client] / trunk / Pithos.Core / Agents / FileAgent.cs
index fc8fbe8..7db1293 100644 (file)
@@ -219,12 +219,14 @@ namespace Pithos.Core.Agents
 
         public string CachePath { get; set; }
 
-        private List<string> _selectivePaths = new List<string>();
+        /*private List<string> _selectivePaths = new List<string>();
         public List<string> SelectivePaths
         {
             get { return _selectivePaths; }
             set { _selectivePaths = value; }
         }
+*/
+        public Selectives Selectives { get; set; }
 
 
         public void Post(WorkflowState workflowState)
@@ -311,9 +313,8 @@ namespace Pithos.Core.Agents
                 return true;
 
             //Ignore if selective synchronization is defined, 
-            return SelectivePaths.Count > 0 
                 //And the target file is not below any of the selective paths
-                && !SelectivePaths.Any(filePath.IsAtOrDirectlyBelow);
+            return !Selectives.IsSelected(AccountInfo, filePath);
         }
 
 /*        private static bool FoundInRoot(string filePath, string rootPath)