{
try
{
- var stack = new StackTrace();
- var type = stack.GetFrame(0).GetMethod().DeclaringType;
-
var log = LogManager.GetLogger(source);
var level = GetLevel(eventType);
TaskEx.Run(()=>log.Logger.Log(GetType(), level, message, null));
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.7.20424.0")]
-[assembly: AssemblyFileVersionAttribute("0.7.20424.0")]
+[assembly: AssemblyVersion("0.7.20424.1")]
+[assembly: AssemblyFileVersionAttribute("0.7.20424.1")]
namespace Pithos.Client.WPF.SelectiveSynch
{
class SelectiveSynchViewModel:Screen
- {
- private const string DirectoryType = "application/directory";
+ {
private readonly IEventAggregator _events ;
DisplayName = container.Name,
Uri=new Uri(client.StorageUrl,String.Format(@"{0}/{1}",Account.AccountName, container.Name)),
Directories = (from dir in client.ListObjects(_monitor.UserName, container.Name)
- where dir.Content_Type == DirectoryType
+ where dir.IsDirectory
select dir).ToTree()
};
var ownFolders = dirs.ToList();
DisplayName=container.Name,
Uri = new Uri(client.StorageUrl, "../" + account.name + "/" + container.Name),
Directories=(from folder in client.ListObjects(account.name,container.Name)
- where folder.Content_Type==DirectoryType
+ where folder.IsDirectory
select folder).ToTree()
}).ToList()
};
<system.diagnostics >
<sources >
- <source name="System.Net" switchValue="Verbose" tracemode="protocolonly" maxdatasize="65536" >
+ <source name="System.Net" switchValue="Information" tracemode="protocolonly" maxdatasize="65536" >
<listeners>
<add name="ms" type="Pithos.Client.WPF.Diagnostics.Log4NetForwarder,PithosPlus"/>
</listeners>
var downloadPath = action.LocalFile.GetProperCapitalization();
var cloudHash = cloudFile.Hash.ToLower();
- var previousCloudHash = cloudFile.PreviousHash.ToLower();
+ var previousCloudHash = cloudFile.PreviousHash == null?null: cloudFile.PreviousHash.ToLower();
var localHash = action.TreeHash.Value.TopHash.ToHashString();// LocalHash.Value.ToLower();
//var topHash = action.TopHash.Value.ToLower();
+ if(cloudFile.IsDirectory && action.LocalFile is DirectoryInfo)
+ {
+ Log.InfoFormat("Skipping folder {0} , exists in server", downloadPath);
+ return;
+ }
+
//At this point we know that an object has changed on the server and that a local
//file already exists. We need to decide whether the file has only changed on
//the server or there is a conflicting change on the client.
{\r
var localFile = fileAgent.GetFileSystemInfo(relativePath);\r
//We don't need to sync directories\r
- if (objectInfo.Content_Type == @"application/directory" && localFile is DirectoryInfo)\r
+ if (objectInfo.IsDirectory && localFile is DirectoryInfo)\r
continue;\r
using (new SessionScope(FlushAction.Never))\r
{\r
if (!x.CloudFile.Hash.Equals(y.CloudFile.Hash))
return false;
//All directories have the same hash. Compare them using their names instead
- if (x.CloudFile.Content_Type == y.CloudFile.Content_Type && x.CloudFile.Content_Type == "application/directory")
+ if (x.CloudFile.Content_Type == y.CloudFile.Content_Type && x.CloudFile.IsDirectory)
{
return (x.CloudFile.Name == y.CloudFile.Name);
}
if (obj.CloudFile != null)
{
//All directories have the same hash code. Use their name's hash code instead
- hash2 = obj.CloudFile.Content_Type == "application/directory"
+ hash2 = obj.CloudFile.IsDirectory
? obj.CloudFile.Name.GetHashCode()
: (obj.CloudFile.Hash ?? obj.CloudFile.Name ?? "").GetHashCode();
}
var pithos=containers.First(c => c.Name == "pithos");
- var directories=client.ListObjects(account,"pithos","").Where(info=>info.Content_Type=="application/directory");
+ var directories=client.ListObjects(account,"pithos","").Where(info=>info.IsDirectory);
Assert.That(directories,!Is.Empty);
- Assert.IsTrue(directories.All(info=>info.Content_Type=="application/directory"));
+ Assert.IsTrue(directories.All(info=>info.IsDirectory));
}