Using MD5 to quickly check for local modifications before calculating the expensive...
[pithos-ms-client] / trunk / Pithos.Core / Agents / Uploader.cs
index 37c55be..136bbbf 100644 (file)
@@ -134,7 +134,7 @@ namespace Pithos.Core.Agents
                             if (fileInfo is DirectoryInfo)\r
                             {\r
                                 //If the directory doesn't exist the Hash property will be empty\r
-                                if (String.IsNullOrWhiteSpace(cloudInfo.Hash))\r
+                                if (String.IsNullOrWhiteSpace(cloudInfo.X_Object_Hash))\r
                                     //Go on and create the directory\r
                                     await client.PutObject(account, cloudFile.Container, cloudFile.Name, fullFileName,\r
                                                          String.Empty, "application/directory");\r
@@ -142,16 +142,15 @@ namespace Pithos.Core.Agents
                                 if (action.IsCreation)\r
                                 {\r
                                     //Add the folder to the Selected URls\r
-                                    var selections = Selectives.SelectiveUris[accountInfo.AccountKey];\r
                                     var selectiveUri = new Uri(client.RootAddressUri, cloudFile.Uri);\r
-                                    selections.Add(selectiveUri);\r
+                                    Selectives.AddUri(accountInfo, selectiveUri);                                    \r
                                     Selectives.Save(accountInfo);\r
                                 }\r
                             }\r
                             else\r
                             {\r
 \r
-                                var cloudHash = cloudInfo.Hash.ToLower();\r
+                                var cloudHash = cloudInfo.X_Object_Hash.ToLower();\r
 \r
                                 string topHash;\r
                                 TreeHash treeHash;\r