[assembly: AssemblyCopyright("Copyright © GRNet 2011-2012")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-[assembly: AssemblyInformationalVersion("2012-05-15")]
+[assembly: AssemblyInformationalVersion("2012-05-22")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// 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.20518.0")]
-[assembly: AssemblyFileVersionAttribute("0.7.20518.0")]
+[assembly: AssemblyVersion("0.7.20522.0")]
+[assembly: AssemblyFileVersionAttribute("0.7.20522.0")]
using System.Collections.Concurrent;\r
using System.Collections.Generic;\r
using System.ComponentModel.Composition;\r
+using System.Diagnostics.Contracts;\r
using System.IO;\r
using System.Linq;\r
using System.Text;\r
\r
private ConcurrentDictionary<Uri, List<string>> SelectivePaths { get; set; }\r
\r
+ [Import]\r
+ public IPithosSettings Settings { get; set; }\r
+\r
public Selectives()\r
{\r
SelectiveUris = new ConcurrentDictionary<Uri, List<Uri>>();\r
return own.Union(others).ToList();\r
}\r
\r
+ public void Save(AccountInfo account)\r
+ {\r
+ Contract.Requires(account!=null);\r
+ Contract.EndContractBlock();\r
+\r
+ var selections = SelectiveUris[account.AccountKey];\r
+ var accountSettings= Settings.Accounts.First(acc => acc.AccountKey == account.AccountKey);\r
+ accountSettings.SelectiveFolders.Clear();\r
+ accountSettings.SelectiveFolders.AddRange(selections.Select(uri => uri.ToString()).ToArray());\r
+ Settings.Save(); \r
+\r
+ }\r
+\r
}\r
}\r
[Import]\r
private IStatusKeeper StatusKeeper { get; set; }\r
\r
- \r
public IStatusNotification StatusNotification { get; set; }\r
\r
\r
//Go on and create the directory\r
await client.PutObject(account, cloudFile.Container, cloudFile.Name, fullFileName,\r
String.Empty, "application/directory");\r
+ //If the upload is in response to a Folder create with Selective Sync enabled\r
+ if (action.IsCreation)\r
+ {\r
+ //Add the folder to the Selected URls\r
+ var selections = Selectives.SelectiveUris[accountInfo.AccountKey];\r
+ selections.Add(cloudFile.Uri);\r
+ Selectives.Save(accountInfo);\r
+ }\r
}\r
else\r
{\r
if (Log.IsDebugEnabled) Log.DebugFormat("Skipping {0}", state.FileName);
return CompletedTask<object>.Default;
- }
+ }
- var info = Directory.Exists(state.Path) ? (FileSystemInfo)new DirectoryInfo(state.Path) : new FileInfo(state.Path);
+ var info = FileInfoExtensions.FromPath(state.Path);// Directory.Exists(state.Path) ? (FileSystemInfo)new DirectoryInfo(state.Path) : new FileInfo(state.Path);
//Bypass deleted files, unless the status is Deleted
if (!info.Exists && state.Status != FileStatus.Deleted)
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Pithos.Interfaces.Test", "Pithos.Interfaces.Test\Pithos.Interfaces.Test.csproj", "{881F7260-CA40-40FD-AEEC-860B346DC2DC}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "log4netViewer", "log4netViewer\log4netViewer\log4netViewer.csproj", "{FF08C711-3DBC-4767-9600-CF68A64CFD55}"
-EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug All|Any CPU = Debug All|Any CPU
{881F7260-CA40-40FD-AEEC-860B346DC2DC}.Test|Mixed Platforms.Build.0 = Release|Any CPU
{881F7260-CA40-40FD-AEEC-860B346DC2DC}.Test|x64.ActiveCfg = Release|Any CPU
{881F7260-CA40-40FD-AEEC-860B346DC2DC}.Test|x86.ActiveCfg = Release|Any CPU
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug All|Any CPU.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug All|Mixed Platforms.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug All|Mixed Platforms.Build.0 = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug All|x64.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug All|x86.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug All|x86.Build.0 = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug|Any CPU.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug|Mixed Platforms.Build.0 = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug|x64.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug|x86.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Debug|x86.Build.0 = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Premium Debug|Any CPU.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Premium Debug|Mixed Platforms.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Premium Debug|Mixed Platforms.Build.0 = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Premium Debug|x64.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Premium Debug|x86.ActiveCfg = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Premium Debug|x86.Build.0 = Debug|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Release|Any CPU.ActiveCfg = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Release|Mixed Platforms.ActiveCfg = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Release|Mixed Platforms.Build.0 = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Release|x64.ActiveCfg = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Release|x86.ActiveCfg = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Release|x86.Build.0 = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Test|Any CPU.ActiveCfg = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Test|Mixed Platforms.ActiveCfg = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Test|Mixed Platforms.Build.0 = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Test|x64.ActiveCfg = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Test|x86.ActiveCfg = Release|x86
- {FF08C711-3DBC-4767-9600-CF68A64CFD55}.Test|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE