Revision 268bec7f

b/trunk/Pithos.Client.WPF/Diagnostics/log4netForwarder.cs
93 93
        {
94 94
            try
95 95
            {
96
                var stack = new StackTrace();
97
                var type = stack.GetFrame(0).GetMethod().DeclaringType;
98

  
99 96
                var log = LogManager.GetLogger(source);
100 97
                var level = GetLevel(eventType);
101 98
                TaskEx.Run(()=>log.Logger.Log(GetType(), level, message, null));
b/trunk/Pithos.Client.WPF/Properties/AssemblyInfo.cs
93 93
// You can specify all the values or you can default the Build and Revision Numbers 
94 94
// by using the '*' as shown below:
95 95
// [assembly: AssemblyVersion("1.0.*")]
96
[assembly: AssemblyVersion("0.7.20424.0")]
97
[assembly: AssemblyFileVersionAttribute("0.7.20424.0")]
96
[assembly: AssemblyVersion("0.7.20424.1")]
97
[assembly: AssemblyFileVersionAttribute("0.7.20424.1")]
b/trunk/Pithos.Client.WPF/SelectiveSynch/SelectiveSynchViewModel.cs
53 53
namespace Pithos.Client.WPF.SelectiveSynch
54 54
{
55 55
    class SelectiveSynchViewModel:Screen
56
    {
57
        private const string DirectoryType = "application/directory";
56
    {        
58 57
        private readonly IEventAggregator _events ;
59 58

  
60 59

  
......
105 104
                                      DisplayName = container.Name,
106 105
                                      Uri=new Uri(client.StorageUrl,String.Format(@"{0}/{1}",Account.AccountName, container.Name)),
107 106
                                      Directories = (from dir in client.ListObjects(_monitor.UserName, container.Name)                                                     
108
                                                     where dir.Content_Type == DirectoryType
107
                                                     where dir.IsDirectory
109 108
                                                     select dir).ToTree()
110 109
                                  };
111 110
            var ownFolders = dirs.ToList();
......
121 120
                                                            DisplayName=container.Name,
122 121
                                                            Uri = new Uri(client.StorageUrl, "../" + account.name + "/" + container.Name),
123 122
                                                            Directories=(from folder in client.ListObjects(account.name,container.Name)
124
                                                                        where folder.Content_Type==DirectoryType
123
                                                                        where folder.IsDirectory
125 124
                                                                        select folder).ToTree()
126 125
                                                        }).ToList()
127 126
                             };                                                          
b/trunk/Pithos.Client.WPF/app.config
28 28

  
29 29
<system.diagnostics >
30 30
    <sources >
31
      <source name="System.Net"  switchValue="Verbose" tracemode="protocolonly" maxdatasize="65536" >
31
      <source name="System.Net"  switchValue="Information" tracemode="protocolonly" maxdatasize="65536" >
32 32
        <listeners>
33 33
          <add name="ms" type="Pithos.Client.WPF.Diagnostics.Log4NetForwarder,PithosPlus"/>
34 34
        </listeners>
b/trunk/Pithos.Core/Agents/NetworkAgent.cs
331 331
                var downloadPath = action.LocalFile.GetProperCapitalization();
332 332

  
333 333
                var cloudHash = cloudFile.Hash.ToLower();
334
                var previousCloudHash = cloudFile.PreviousHash.ToLower();
334
                var previousCloudHash = cloudFile.PreviousHash == null?null: cloudFile.PreviousHash.ToLower();
335 335
                var localHash = action.TreeHash.Value.TopHash.ToHashString();// LocalHash.Value.ToLower();
336 336
                //var topHash = action.TopHash.Value.ToLower();
337 337

  
338
                if(cloudFile.IsDirectory && action.LocalFile is DirectoryInfo)
339
                {
340
                    Log.InfoFormat("Skipping folder {0} , exists in server", downloadPath);
341
                    return;
342
                }
343

  
338 344
                //At this point we know that an object has changed on the server and that a local
339 345
                //file already exists. We need to decide whether the file has only changed on 
340 346
                //the server or there is a conflicting change on the client.
b/trunk/Pithos.Core/Agents/PollAgent.cs
469 469
                {
470 470
                    var localFile = fileAgent.GetFileSystemInfo(relativePath);
471 471
                    //We don't need to sync directories
472
                    if (objectInfo.Content_Type == @"application/directory" && localFile is DirectoryInfo)
472
                    if (objectInfo.IsDirectory && localFile is DirectoryInfo)
473 473
                        continue;
474 474
                    using (new SessionScope(FlushAction.Never))
475 475
                    {
b/trunk/Pithos.Core/LocalFileComparer.cs
24 24
                if (!x.CloudFile.Hash.Equals(y.CloudFile.Hash))
25 25
                    return false;
26 26
                //All directories have the same hash. Compare them using their names instead
27
                if (x.CloudFile.Content_Type == y.CloudFile.Content_Type && x.CloudFile.Content_Type == "application/directory")
27
                if (x.CloudFile.Content_Type == y.CloudFile.Content_Type && x.CloudFile.IsDirectory)
28 28
                {
29 29
                    return (x.CloudFile.Name == y.CloudFile.Name);
30 30
                }
......
44 44
            if (obj.CloudFile != null)
45 45
            {
46 46
                //All directories have the same hash code. Use their name's hash code instead
47
                hash2 = obj.CloudFile.Content_Type == "application/directory" 
47
                hash2 = obj.CloudFile.IsDirectory 
48 48
                            ? obj.CloudFile.Name.GetHashCode() 
49 49
                            : (obj.CloudFile.Hash ?? obj.CloudFile.Name ?? "").GetHashCode();
50 50
            }
b/trunk/Pithos.Network.Test/CloudFilesClientTest.cs
71 71

  
72 72

  
73 73
            var pithos=containers.First(c => c.Name == "pithos");
74
            var directories=client.ListObjects(account,"pithos","").Where(info=>info.Content_Type=="application/directory");
74
            var directories=client.ListObjects(account,"pithos","").Where(info=>info.IsDirectory);
75 75
            Assert.That(directories,!Is.Empty);
76
            Assert.IsTrue(directories.All(info=>info.Content_Type=="application/directory"));
76
            Assert.IsTrue(directories.All(info=>info.IsDirectory));
77 77
        }
78 78

  
79 79

  

Also available in: Unified diff