Minor fix in Selective sync to ignore 403 errors the first time new share listings...
[pithos-ms-client] / trunk / Pithos.Core / Agents / NetworkAgent.cs
index 67ea177..d480f97 100644 (file)
@@ -409,6 +409,13 @@ namespace Pithos.Core.Agents
                     return;
                 }
 
+                //If the local and remote files have 0 length their hashes will not match
+                if (!cloudFile.IsDirectory && cloudFile.Bytes==0 && action.LocalFile is FileInfo && (action.LocalFile as FileInfo).Length==0 )
+                {
+                    Log.InfoFormat("Skipping {0}, files are empty", downloadPath);
+                    return;
+                }
+
                 //The hashes DON'T match. We need to sync
 
                 // If the previous tophash matches the local tophash, the file was only changed on the server.