diff options
author | Max <michal@naiman.eu> | 2016-06-28 20:52:28 +0300 |
---|---|---|
committer | Max <michal@naiman.eu> | 2016-06-28 20:52:28 +0300 |
commit | 4960fd4202ee6a957a3e928d2fb71bcef490e3e4 (patch) | |
tree | 736bc6aeafeb7a4bde6cd048a5f327066abbdacf /Duplicati | |
parent | 9f0b3a004243710e31c4dd0c591dd2891606b618 (diff) | |
parent | 9c003736a1e0a0f17532b355b3e6ea9c860a74fa (diff) |
merge upstream
Diffstat (limited to 'Duplicati')
72 files changed, 456 insertions, 252 deletions
diff --git a/Duplicati/CommandLine/BackendTester/Duplicati.CommandLine.BackendTester.csproj b/Duplicati/CommandLine/BackendTester/Duplicati.CommandLine.BackendTester.csproj index 4e6d842c1..e9596f3dc 100644 --- a/Duplicati/CommandLine/BackendTester/Duplicati.CommandLine.BackendTester.csproj +++ b/Duplicati/CommandLine/BackendTester/Duplicati.CommandLine.BackendTester.csproj @@ -13,7 +13,7 @@ </FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
- <SignAssembly>true</SignAssembly>
+ <SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
@@ -45,7 +45,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
</ItemGroup>
<ItemGroup>
<Compile Include="NonSeekableStream.cs" />
diff --git a/Duplicati/CommandLine/BackendTool/Duplicati.CommandLine.BackendTool.csproj b/Duplicati/CommandLine/BackendTool/Duplicati.CommandLine.BackendTool.csproj index 3c4c18df2..9741f7991 100644 --- a/Duplicati/CommandLine/BackendTool/Duplicati.CommandLine.BackendTool.csproj +++ b/Duplicati/CommandLine/BackendTool/Duplicati.CommandLine.BackendTool.csproj @@ -7,7 +7,7 @@ <OutputType>Exe</OutputType>
<RootNamespace>Duplicati.CommandLine.BackendTool</RootNamespace>
<AssemblyName>Duplicati.CommandLine.BackendTool</AssemblyName>
- <SignAssembly>true</SignAssembly>
+ <SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>..\Duplicati.snk</AssemblyOriginatorKeyFile>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
@@ -39,9 +39,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
- </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
diff --git a/Duplicati/CommandLine/Duplicati.CommandLine.csproj b/Duplicati/CommandLine/Duplicati.CommandLine.csproj index 698c2ce4e..08a63a356 100644 --- a/Duplicati/CommandLine/Duplicati.CommandLine.csproj +++ b/Duplicati/CommandLine/Duplicati.CommandLine.csproj @@ -8,7 +8,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.CommandLine</RootNamespace>
<AssemblyName>Duplicati.CommandLine</AssemblyName>
- <SignAssembly>true</SignAssembly>
+ <SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
<ApplicationIcon>TrayWarning.ico</ApplicationIcon>
<FileUpgradeFlags>
@@ -43,12 +43,7 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
<Reference Include="System.Core" />
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
- </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Help.cs" />
diff --git a/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj b/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj index 06041fbbb..98fa1c568 100644 --- a/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj +++ b/Duplicati/CommandLine/RecoveryTool/Duplicati.CommandLine.RecoveryTool.csproj @@ -7,7 +7,7 @@ <OutputType>Exe</OutputType> <RootNamespace>Duplicati.CommandLine.RecoveryTool</RootNamespace> <AssemblyName>Duplicati.CommandLine.RecoveryTool</AssemblyName> - <SignAssembly>true</SignAssembly> + <SignAssembly>false</SignAssembly> <AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> </PropertyGroup> diff --git a/Duplicati/CommandLine/help.txt b/Duplicati/CommandLine/help.txt index f3498d586..1f9a9e4f3 100644 --- a/Duplicati/CommandLine/help.txt +++ b/Duplicati/CommandLine/help.txt @@ -196,7 +196,7 @@ Usage: repair <storage-URL> [<options>] > duplicati.commandline.exe help test
> duplicati.commandline.exe help verify
-Usage: test <storage-URL> [<samples>] [<options>]
+Usage: test <storage-URL> <samples> [<options>]
Verifies integrity of a backup. A random sample of dlist, dindex, dblock files is downloaded, decrypted and the content is checked against recorded size values and data hashes. <samples> specifies the number of samples to be tested. If "all” is specified, all files in the backup will be tested. This is a rolling check, i.e. when executed another time different samples are verified than in the first run. A sample consists of 1 dlist, 1 dindex, 1 dblock.
@@ -204,6 +204,8 @@ Usage: test <storage-URL> [<samples>] [<options>] Checks samples from a specific time.
--version=<int>
Checks samples from specific versions. Delimiters are , -
+ --full-remote-verification
+ Checks the internal structure of each file instead of just verifying the file hash
diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj index 0045dd960..5a0048049 100644 --- a/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/Duplicati.GUI.TrayIcon.csproj @@ -64,13 +64,8 @@ <ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
<Reference Include="appindicator-sharp">
<HintPath>..\..\..\thirdparty\appindicator-sharp\appindicator-sharp.dll</HintPath>
<Private>False</Private>
@@ -90,11 +85,12 @@ <HintPath>..\..\..\thirdparty\notify-sharp\notify-sharp.dll</HintPath>
<Private>False</Private>
</Reference>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
- </Reference>
+ <Reference Include="System.Drawing" />
<Reference Include="CoCoL">
- <HintPath>..\..\..\thirdparty\CoCoL\CoCoL.dll</HintPath>
+ <HintPath>..\..\..\packages\CoCoL.1.5.0\lib\net45\CoCoL.dll</HintPath>
+ </Reference>
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -144,6 +140,7 @@ <EmbeddedResource Include="Resources\Play.png" />
<EmbeddedResource Include="Resources\StatusMenuIcon.png" />
<Compile Include="RumpsRunner.cs" />
+ <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Library\Backend\CloudFiles\Duplicati.Library.Backend.CloudFiles.csproj">
diff --git a/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config b/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config new file mode 100644 index 000000000..d325c137a --- /dev/null +++ b/Duplicati/GUI/Duplicati.GUI.TrayIcon/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="CoCoL" version="1.5.0" targetFramework="net45" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj b/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj index 03ad4e1f5..1937be84c 100644 --- a/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj +++ b/Duplicati/Library/AutoUpdater/Duplicati.Library.AutoUpdater.csproj @@ -36,7 +36,7 @@ <ItemGroup>
<Reference Include="System" />
<Reference Include="Newtonsoft.Json">
- <HintPath>..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
+ <HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -77,5 +77,6 @@ </ItemGroup>
<ItemGroup>
<None Include="app.config" />
+ <None Include="packages.config" />
</ItemGroup>
</Project>
\ No newline at end of file diff --git a/Duplicati/Library/AutoUpdater/packages.config b/Duplicati/Library/AutoUpdater/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/AutoUpdater/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/AmazonCloudDrive/Duplicati.Library.Backend.AmazonCloudDrive.csproj b/Duplicati/Library/Backend/AmazonCloudDrive/Duplicati.Library.Backend.AmazonCloudDrive.csproj index cfa89b24c..9d5e22c66 100644 --- a/Duplicati/Library/Backend/AmazonCloudDrive/Duplicati.Library.Backend.AmazonCloudDrive.csproj +++ b/Duplicati/Library/Backend/AmazonCloudDrive/Duplicati.Library.Backend.AmazonCloudDrive.csproj @@ -32,7 +32,7 @@ <ItemGroup> <Reference Include="System" /> <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath> + <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -59,4 +59,7 @@ <Name>Duplicati.Library.Interface</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/AmazonCloudDrive/packages.config b/Duplicati/Library/Backend/AmazonCloudDrive/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/Backend/AmazonCloudDrive/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj b/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj index 26ff982c1..37708d6d6 100644 --- a/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj +++ b/Duplicati/Library/Backend/AzureBlob/Duplicati.Library.Backend.AzureBlob.csproj @@ -37,27 +37,30 @@ <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> - <Reference Include="System.Xml.Linq" /> - <Reference Include="Microsoft.CSharp" /> + <Reference Include="Microsoft.Azure.KeyVault.Core"> + <HintPath>..\..\..\..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath> + </Reference> <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - <Reference Include="Microsoft.Data.OData"> - <HintPath>..\..\..\..\thirdparty\WindowsAzureStorage\Microsoft.Data.OData.dll</HintPath> + <Reference Include="Microsoft.WindowsAzure.Storage"> + <HintPath>..\..\..\..\packages\WindowsAzure.Storage.7.0.0\lib\net40\Microsoft.WindowsAzure.Storage.dll</HintPath> </Reference> - <Reference Include="Microsoft.Data.Services.Client"> - <HintPath>..\..\..\..\thirdparty\WindowsAzureStorage\Microsoft.Data.Services.Client.dll</HintPath> + <Reference Include="Newtonsoft.Json"> + <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> <Reference Include="Microsoft.WindowsAzure.Configuration"> - <HintPath>..\..\..\..\thirdparty\WindowsAzureStorage\Microsoft.WindowsAzure.Configuration.dll</HintPath> + <HintPath>..\..\..\..\packages\Microsoft.WindowsAzure.ConfigurationManager.3.2.1\lib\net40\Microsoft.WindowsAzure.Configuration.dll</HintPath> </Reference> - <Reference Include="Microsoft.WindowsAzure.Storage"> - <HintPath>..\..\..\..\thirdparty\WindowsAzureStorage\Microsoft.WindowsAzure.Storage.dll</HintPath> + <Reference Include="System.Spatial"> + <HintPath>..\..\..\..\packages\System.Spatial.5.7.0\lib\net40\System.Spatial.dll</HintPath> </Reference> <Reference Include="Microsoft.Data.Edm"> - <HintPath>..\..\..\..\thirdparty\WindowsAzureStorage\Microsoft.Data.Edm.dll</HintPath> + <HintPath>..\..\..\..\packages\Microsoft.Data.Edm.5.7.0\lib\net40\Microsoft.Data.Edm.dll</HintPath> </Reference> - <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath> + <Reference Include="Microsoft.Data.OData"> + <HintPath>..\..\..\..\packages\Microsoft.Data.OData.5.7.0\lib\net40\Microsoft.Data.OData.dll</HintPath> + </Reference> + <Reference Include="Microsoft.Data.Services.Client"> + <HintPath>..\..\..\..\packages\Microsoft.Data.Services.Client.5.7.0\lib\net40\Microsoft.Data.Services.Client.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -82,6 +85,7 @@ </ItemGroup> <ItemGroup> <None Include="Duplicati.snk" /> + <None Include="packages.config" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. diff --git a/Duplicati/Library/Backend/AzureBlob/packages.config b/Duplicati/Library/Backend/AzureBlob/packages.config new file mode 100644 index 000000000..08f04fd6c --- /dev/null +++ b/Duplicati/Library/Backend/AzureBlob/packages.config @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net45" /> + <package id="Microsoft.Data.Edm" version="5.7.0" targetFramework="net45" /> + <package id="Microsoft.Data.OData" version="5.7.0" targetFramework="net45" /> + <package id="Microsoft.Data.Services.Client" version="5.7.0" targetFramework="net45" /> + <package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.1" targetFramework="net45" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> + <package id="System.Spatial" version="5.7.0" targetFramework="net45" /> + <package id="WindowsAzure.Storage" version="7.0.0" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj b/Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj index f63ab50e2..db695f659 100644 --- a/Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj +++ b/Duplicati/Library/Backend/Backblaze/Duplicati.Library.Backend.Backblaze.csproj @@ -32,7 +32,7 @@ <ItemGroup> <Reference Include="System" /> <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath> + <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -60,4 +60,7 @@ <Name>Duplicati.Library.Interface</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/Backblaze/packages.config b/Duplicati/Library/Backend/Backblaze/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/Backend/Backblaze/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj b/Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj index c32ae1150..7af1b76de 100644 --- a/Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj +++ b/Duplicati/Library/Backend/Box/Duplicati.Library.Backend.Box.csproj @@ -32,7 +32,7 @@ <ItemGroup> <Reference Include="System" /> <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath> + <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -59,4 +59,7 @@ <Name>Duplicati.Library.OAuthHelper</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/Box/packages.config b/Duplicati/Library/Backend/Box/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/Backend/Box/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs b/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs index fda8efd80..6f83c2af2 100644 --- a/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs +++ b/Duplicati/Library/Backend/CloudFiles/CloudFiles.cs @@ -98,9 +98,9 @@ namespace Duplicati.Library.Backend //This allows the use of containers that have names that are not valid hostnames,
// such as container names with spaces in them
if (u.Host.Equals(DUMMY_HOSTNAME))
- m_path = System.Web.HttpUtility.UrlDecode(u.PathAndQuery);
+ m_path = Library.Utility.Uri.UrlDecode(u.PathAndQuery);
else
- m_path = u.Host + System.Web.HttpUtility.UrlDecode(u.PathAndQuery);
+ m_path = u.Host + Library.Utility.Uri.UrlDecode(u.PathAndQuery);
}
else
{
@@ -188,7 +188,7 @@ namespace Duplicati.Library.Backend repeat = lst.Count == ITEM_LIST_LIMIT;
if (repeat)
- markerUrl = "&marker=" + System.Web.HttpUtility.UrlEncode(lastItemName);
+ markerUrl = "&marker=" + Library.Utility.Uri.UrlEncode(lastItemName);
} while (repeat);
@@ -423,7 +423,7 @@ namespace Duplicati.Library.Backend private string UrlEncode(string value)
{
- return System.Web.HttpUtility.UrlEncode(value).Replace("+", "%20").Replace("%2f", "/");
+ return Library.Utility.Uri.UrlEncode(value).Replace("+", "%20").Replace("%2f", "/");
}
}
}
diff --git a/Duplicati/Library/Backend/CloudFiles/Duplicati.Library.Backend.CloudFiles.csproj b/Duplicati/Library/Backend/CloudFiles/Duplicati.Library.Backend.CloudFiles.csproj index d194fbaa8..416aa878f 100644 --- a/Duplicati/Library/Backend/CloudFiles/Duplicati.Library.Backend.CloudFiles.csproj +++ b/Duplicati/Library/Backend/CloudFiles/Duplicati.Library.Backend.CloudFiles.csproj @@ -37,10 +37,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Web" />
- <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
diff --git a/Duplicati/Library/Backend/FTP/Duplicati.Library.Backend.FTP.csproj b/Duplicati/Library/Backend/FTP/Duplicati.Library.Backend.FTP.csproj index d5f5024d0..e15d090c5 100644 --- a/Duplicati/Library/Backend/FTP/Duplicati.Library.Backend.FTP.csproj +++ b/Duplicati/Library/Backend/FTP/Duplicati.Library.Backend.FTP.csproj @@ -37,10 +37,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
diff --git a/Duplicati/Library/Backend/File/Duplicati.Library.Backend.File.csproj b/Duplicati/Library/Backend/File/Duplicati.Library.Backend.File.csproj index 3c87c3cc7..df1d615e1 100644 --- a/Duplicati/Library/Backend/File/Duplicati.Library.Backend.File.csproj +++ b/Duplicati/Library/Backend/File/Duplicati.Library.Backend.File.csproj @@ -37,10 +37,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="FileBackend.cs" />
diff --git a/Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj b/Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj index 022ef6911..284c0c6f8 100644 --- a/Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj +++ b/Duplicati/Library/Backend/GoogleServices/Duplicati.Library.Backend.GoogleServices.csproj @@ -30,9 +30,8 @@ </PropertyGroup> <ItemGroup> <Reference Include="System" /> - <Reference Include="System.Web" /> <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath> + <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -62,4 +61,7 @@ <Name>Duplicati.Library.OAuthHelper</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/GoogleServices/packages.config b/Duplicati/Library/Backend/GoogleServices/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/Backend/GoogleServices/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj b/Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj index 1bfa7bf7d..f18b63f4e 100644 --- a/Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj +++ b/Duplicati/Library/Backend/Mega/Duplicati.Library.Backend.Mega.csproj @@ -31,11 +31,11 @@ </PropertyGroup> <ItemGroup> <Reference Include="System" /> - <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath> - </Reference> <Reference Include="MegaApiClient"> - <HintPath>..\..\..\..\thirdparty\MegaApi\MegaApiClient.dll</HintPath> + <HintPath>..\..\..\..\packages\MegaApiClient.1.2.2\lib\net45\MegaApiClient.dll</HintPath> + </Reference> + <Reference Include="Newtonsoft.Json"> + <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -58,4 +58,7 @@ <Name>Duplicati.Library.Utility</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/Mega/packages.config b/Duplicati/Library/Backend/Mega/packages.config new file mode 100644 index 000000000..f08d64620 --- /dev/null +++ b/Duplicati/Library/Backend/Mega/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="MegaApiClient" version="1.2.2" targetFramework="net45" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj b/Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj index bc392049e..a1416d98a 100644 --- a/Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj +++ b/Duplicati/Library/Backend/OAuthHelper/Duplicati.Library.OAuthHelper.csproj @@ -32,7 +32,7 @@ <ItemGroup> <Reference Include="System" /> <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath> + <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -53,4 +53,7 @@ <Name>Duplicati.Library.Localization</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/OAuthHelper/packages.config b/Duplicati/Library/Backend/OAuthHelper/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/Backend/OAuthHelper/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj b/Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj index 1e9f12f93..6586af949 100644 --- a/Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj +++ b/Duplicati/Library/Backend/OneDrive/Duplicati.Library.Backend.OneDrive.csproj @@ -39,11 +39,12 @@ </PropertyGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
+ <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="Newtonsoft.Json">
- <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
+ <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
diff --git a/Duplicati/Library/Backend/OneDrive/packages.config b/Duplicati/Library/Backend/OneDrive/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/Backend/OneDrive/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj b/Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj index 098f309db..1f4dc2c78 100644 --- a/Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj +++ b/Duplicati/Library/Backend/OpenStack/Duplicati.Library.Backend.OpenStack.csproj @@ -32,7 +32,7 @@ <ItemGroup> <Reference Include="System" /> <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath> + <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -60,4 +60,7 @@ <Name>Duplicati.Library.OAuthHelper</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/OpenStack/packages.config b/Duplicati/Library/Backend/OpenStack/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/Backend/OpenStack/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj b/Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj index 71522edcd..181d148c2 100644 --- a/Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj +++ b/Duplicati/Library/Backend/S3/Duplicati.Library.Backend.S3.csproj @@ -37,19 +37,14 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Web" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
<Reference Include="AWSSDK.Core">
- <HintPath>..\..\..\..\thirdparty\AWS SDK\AWSSDK.Core.dll</HintPath>
+ <HintPath>..\..\..\..\packages\AWSSDK.Core.3.1.7.0\lib\net45\AWSSDK.Core.dll</HintPath>
</Reference>
<Reference Include="AWSSDK.S3">
- <HintPath>..\..\..\..\thirdparty\AWS SDK\AWSSDK.S3.dll</HintPath>
+ <HintPath>..\..\..\..\packages\AWSSDK.S3.3.1.7.2\lib\net45\AWSSDK.S3.dll</HintPath>
</Reference>
<Reference Include="AWSSDK.IdentityManagement">
- <HintPath>..\..\..\..\thirdparty\AWS SDK\AWSSDK.IdentityManagement.dll</HintPath>
+ <HintPath>..\..\..\..\packages\AWSSDK.IdentityManagement.3.1.4.4\lib\net45\AWSSDK.IdentityManagement.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -77,6 +72,7 @@ <ItemGroup>
<None Include="app.config" />
<None Include="Duplicati.snk" />
+ <None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
diff --git a/Duplicati/Library/Backend/S3/S3Backend.cs b/Duplicati/Library/Backend/S3/S3Backend.cs index 6860e663a..713b9003a 100644 --- a/Duplicati/Library/Backend/S3/S3Backend.cs +++ b/Duplicati/Library/Backend/S3/S3Backend.cs @@ -201,7 +201,7 @@ namespace Duplicati.Library.Backend if (host.ToLower() == s3host)
{
- m_bucket = System.Web.HttpUtility.UrlDecode(u.PathAndQuery);
+ m_bucket = Library.Utility.Uri.UrlDecode(u.PathAndQuery);
if (m_bucket.StartsWith("/"))
m_bucket = m_bucket.Substring(1);
@@ -219,7 +219,7 @@ namespace Duplicati.Library.Backend {
m_bucket = host.Substring(0, host.Length - ("." + s3host).Length);
host = s3host;
- m_prefix = System.Web.HttpUtility.UrlDecode(u.PathAndQuery);
+ m_prefix = Library.Utility.Uri.UrlDecode(u.PathAndQuery);
if (m_prefix.StartsWith("/"))
m_prefix = m_prefix.Substring(1);
diff --git a/Duplicati/Library/Backend/S3/S3Wrapper.cs b/Duplicati/Library/Backend/S3/S3Wrapper.cs index 3d11fbc28..cab82f346 100644 --- a/Duplicati/Library/Backend/S3/S3Wrapper.cs +++ b/Duplicati/Library/Backend/S3/S3Wrapper.cs @@ -23,7 +23,6 @@ using System.Collections.Generic; using System.Text;
using Amazon.S3;
using Amazon.S3.Model;
-using System.Xml;
using Duplicati.Library.Interface;
namespace Duplicati.Library.Backend
@@ -41,10 +40,11 @@ namespace Duplicati.Library.Backend public S3Wrapper(string awsID, string awsKey, string locationConstraint, string servername, string storageClass, bool useSSL, Dictionary<string, string> options)
{
- AmazonS3Config cfg = new AmazonS3Config();
+ var cfg = new AmazonS3Config();
cfg.UseHttp = !useSSL;
cfg.ServiceURL = (useSSL ? "https://" : "http://") + servername;
+ //cfg.UserAgent = "Duplicati v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString() + " S3 client with AWS SDK v" + cfg.GetType().Assembly.GetName().Version.ToString();
cfg.BufferSize = (int)Duplicati.Library.Utility.Utility.DEFAULT_BUFFER_SIZE;
foreach(var opt in options.Keys.Where(x => x.StartsWith("s3-ext-")))
diff --git a/Duplicati/Library/Backend/S3/packages.config b/Duplicati/Library/Backend/S3/packages.config new file mode 100644 index 000000000..e688f07d4 --- /dev/null +++ b/Duplicati/Library/Backend/S3/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="AWSSDK.Core" version="3.1.7.0" targetFramework="net45" /> + <package id="AWSSDK.IdentityManagement" version="3.1.4.4" targetFramework="net45" /> + <package id="AWSSDK.S3" version="3.1.7.2" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj b/Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj index b83572451..273ecf89a 100644 --- a/Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj +++ b/Duplicati/Library/Backend/SSHv2/Duplicati.Library.Backend.SSHv2.csproj @@ -9,7 +9,7 @@ <RootNamespace>Duplicati.Library.Backend</RootNamespace>
<AssemblyName>Duplicati.Library.Backend.SSHv2</AssemblyName>
<FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
+ <SignAssembly>false</SignAssembly>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
@@ -38,15 +38,8 @@ <ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
<Reference Include="Renci.SshNet">
- <HintPath>..\..\..\..\thirdparty\SSH.NET\Renci.SshNet.dll</HintPath>
+ <HintPath>..\..\..\..\packages\SSH.NET.2016.0.0-beta2\lib\net40\Renci.SshNet.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -72,6 +65,7 @@ </ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
+ <None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
diff --git a/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs b/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs index addb961a9..4a7cd7543 100644 --- a/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs +++ b/Duplicati/Library/Backend/SSHv2/SSHv2Backend.cs @@ -27,7 +27,7 @@ using Renci.SshNet.Common; namespace Duplicati.Library.Backend
{
- public class SSHv2 : IStreamingBackend, IRenameEnabledBackend
+ public class SSHv2 : IStreamingBackend, IRenameEnabledBackend, IBackend, IDisposable
{
public const string SSH_KEYFILE_OPTION = "ssh-keyfile";
public const string SSH_KEYFILE_INLINE = "ssh-key";
@@ -45,8 +45,8 @@ namespace Duplicati.Library.Backend private bool m_fingerprintallowall;
private int m_port = 22;
-
- private SftpClient m_con;
+
+ private SftpClient m_con;
public SSHv2()
{
@@ -58,7 +58,7 @@ namespace Duplicati.Library.Backend m_options = options;
var uri = new Utility.Uri(url);
uri.RequireHost();
-
+
if (options.ContainsKey("auth-username"))
m_username = options["auth-username"];
if (options.ContainsKey("auth-password"))
@@ -79,6 +79,9 @@ namespace Duplicati.Library.Backend if (!string.IsNullOrWhiteSpace(m_path) && !m_path.EndsWith("/"))
m_path += "/";
+ if (!m_path.StartsWith("/"))
+ m_path = "/" + m_path;
+
m_server = uri.Host;
if (uri.Port > 0)
@@ -86,7 +89,7 @@ namespace Duplicati.Library.Backend }
#region IBackend Members
-
+
public void Test()
{
List();
@@ -94,14 +97,12 @@ namespace Duplicati.Library.Backend public void CreateFolder()
{
- using (SftpClient con = CreateConnection(false))
- {
- //Bugfix, some SSH servers do not like a trailing slash
- string p = m_path;
- if (p.EndsWith("/"))
- p.Substring(0, p.Length - 1);
- con.CreateDirectory(p);
- }
+ CreateConnection();
+ //Bugfix, some SSH servers do not like a trailing slash
+ string p = m_path;
+ if (p.EndsWith("/"))
+ p.Substring(0, p.Length - 1);
+ m_con.CreateDirectory(p);
}
public string DisplayName
@@ -130,13 +131,15 @@ namespace Duplicati.Library.Backend {
try
{
- CreateConnection(true).DeleteFile(remotename);
+ CreateConnection();
+ ChangeDirectory(m_path);
+ m_con.DeleteFile(remotename);
}
catch (SftpPathNotFoundException ex)
{
throw new FileMissingException(ex);
}
-
+
}
public IList<ICommandLineArgument> SupportedCommands
@@ -165,11 +168,22 @@ namespace Duplicati.Library.Backend public void Dispose()
{
- if (m_con != null)
- {
- m_con.Dispose();
- m_con = null;
- }
+ if (m_con != null)
+ {
+ try
+ {
+ m_con.Dispose();
+ }
+ catch (System.Net.Sockets.SocketException)
+ {
+ //If the operating system sometimes close socket before disposal of connection following exception is thrown
+ //System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
+ }
+ finally
+ {
+ m_con = null;
+ }
+ }
}
#endregion
@@ -178,12 +192,16 @@ namespace Duplicati.Library.Backend public void Put(string remotename, System.IO.Stream stream)
{
- CreateConnection(true).UploadFile(stream, remotename);
+ CreateConnection();
+ ChangeDirectory(m_path);
+ m_con.UploadFile(stream, remotename);
}
public void Get(string remotename, System.IO.Stream stream)
{
- CreateConnection(true).DownloadFile(remotename, stream);
+ CreateConnection();
+ ChangeDirectory(m_path);
+ m_con.DownloadFile(remotename, stream);
}
#endregion
@@ -192,18 +210,26 @@ namespace Duplicati.Library.Backend public void Rename(string source, string target)
{
- CreateConnection(true).RenameFile(source, target);
+ CreateConnection();
+ ChangeDirectory(m_path);
+ m_con.RenameFile(source, target);
}
#endregion
#region Implementation
- private SftpClient CreateConnection(bool changeDir)
+ private void CreateConnection()
{
- if (changeDir && m_con != null)
- return m_con;
-
+ if (m_con != null && m_con.IsConnected)
+ return;
+
+ if (m_con != null && !m_con.IsConnected)
+ {
+ m_con.Connect();
+ return;
+ }
+
SftpClient con;
string keyfile;
@@ -239,20 +265,30 @@ namespace Duplicati.Library.Backend con.Connect();
+ m_con = con;
+ }
+
+ private void ChangeDirectory(string path)
+ {
+ if (string.IsNullOrEmpty(path))
+ return;
+
+ string working_dir = m_con.WorkingDirectory;
+
+ if (!working_dir.EndsWith("/"))
+ working_dir += "/";
+
+ if (working_dir == path)
+ return;
+
try
{
- if (!string.IsNullOrEmpty(m_path) && changeDir)
- con.ChangeDirectory(m_path);
+ m_con.ChangeDirectory(path);
}
catch (Exception ex)
{
- throw new Interface.FolderMissingException(Strings.SSHv2Backend.FolderNotFoundManagedError(m_path, ex.Message), ex);
+ throw new Interface.FolderMissingException(Strings.SSHv2Backend.FolderNotFoundManagedError(path, ex.Message), ex);
}
-
- if (changeDir)
- m_con = con;
-
- return con;
}
public List<IFileEntry> List()
@@ -261,7 +297,10 @@ namespace Duplicati.Library.Backend string path = ".";
- foreach (Renci.SshNet.Sftp.SftpFile ls in CreateConnection(true).ListDirectory(path))
+ CreateConnection();
+ ChangeDirectory(m_path);
+
+ foreach (Renci.SshNet.Sftp.SftpFile ls in m_con.ListDirectory(path))
if (ls.Name.ToString() != "." && ls.Name.ToString() != "..")
files.Add(new FileEntry(ls.Name.ToString(), ls.Length, ls.LastAccessTime, ls.LastWriteTime) { IsFolder = ls.Attributes.IsDirectory });
@@ -272,14 +311,14 @@ namespace Duplicati.Library.Backend {
if (filename.StartsWith(KEYFILE_URI, StringComparison.InvariantCultureIgnoreCase))
{
- using(var ms = new System.IO.MemoryStream())
- using(var sr = new System.IO.StreamWriter(ms))
+ using (var ms = new System.IO.MemoryStream())
+ using (var sr = new System.IO.StreamWriter(ms))
{
sr.Write(Duplicati.Library.Utility.Uri.UrlDecode(filename.Substring(KEYFILE_URI.Length)));
sr.Flush();
-
+
ms.Position = 0;
-
+
if (String.IsNullOrEmpty(password))
return new Renci.SshNet.PrivateKeyFile(ms);
else
@@ -294,18 +333,15 @@ namespace Duplicati.Library.Backend return new Renci.SshNet.PrivateKeyFile(filename, password);
}
}
-
+
#endregion
-
+
internal SftpClient Client
{
get
{
- return CreateConnection(false);
+ return m_con;
}
}
}
-}
-
-
-
\ No newline at end of file +}
\ No newline at end of file diff --git a/Duplicati/Library/Backend/SSHv2/packages.config b/Duplicati/Library/Backend/SSHv2/packages.config new file mode 100644 index 000000000..68bf4c6ac --- /dev/null +++ b/Duplicati/Library/Backend/SSHv2/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="SSH.NET" version="2016.0.0-beta2" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj b/Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj index 717db70d2..53534ec74 100644 --- a/Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj +++ b/Duplicati/Library/Backend/TahoeLAFS/Duplicati.Library.Backend.TahoeLAFS.csproj @@ -39,11 +39,10 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Web" />
+ <Reference Include="System.Core" />
<Reference Include="Newtonsoft.Json">
- <HintPath>..\..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
+ <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
- <Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
@@ -69,6 +68,7 @@ </Compile>
<Compile Include="TahoeBackend.cs" />
<Compile Include="Strings.cs" />
+ <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Interface\Duplicati.Library.Interface.csproj">
diff --git a/Duplicati/Library/Backend/TahoeLAFS/TahoeBackend.cs b/Duplicati/Library/Backend/TahoeLAFS/TahoeBackend.cs index 8d09c3fd7..ef4d9c954 100644 --- a/Duplicati/Library/Backend/TahoeLAFS/TahoeBackend.cs +++ b/Duplicati/Library/Backend/TahoeLAFS/TahoeBackend.cs @@ -111,7 +111,7 @@ namespace Duplicati.Library.Backend private System.Net.HttpWebRequest CreateRequest(string remotename, string queryparams)
{
- System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(m_url + (System.Web.HttpUtility.UrlEncode(remotename).Replace("+", "%20")) + (string.IsNullOrEmpty(queryparams) || queryparams.Trim().Length == 0 ? "" : "?" + queryparams));
+ System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(m_url + (Library.Utility.Uri.UrlEncode(remotename).Replace("+", "%20")) + (string.IsNullOrEmpty(queryparams) || queryparams.Trim().Length == 0 ? "" : "?" + queryparams));
req.KeepAlive = false;
req.UserAgent = "Duplicati Tahoe-LAFS Client v" + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
diff --git a/Duplicati/Library/Backend/TahoeLAFS/packages.config b/Duplicati/Library/Backend/TahoeLAFS/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/Backend/TahoeLAFS/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Backend/WEBDAV/Duplicati.Library.Backend.WEBDAV.csproj b/Duplicati/Library/Backend/WEBDAV/Duplicati.Library.Backend.WEBDAV.csproj index f1b332696..5d1e519e7 100644 --- a/Duplicati/Library/Backend/WEBDAV/Duplicati.Library.Backend.WEBDAV.csproj +++ b/Duplicati/Library/Backend/WEBDAV/Duplicati.Library.Backend.WEBDAV.csproj @@ -37,10 +37,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Web" />
- <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
diff --git a/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs b/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs index e6f234046..6f8a95654 100644 --- a/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs +++ b/Duplicati/Library/Backend/WEBDAV/WEBDAV.cs @@ -100,7 +100,7 @@ namespace Duplicati.Library.Backend if (!m_path.EndsWith("/"))
m_path += "/";
- m_path = System.Web.HttpUtility.UrlDecode(m_path);
+ m_path = Library.Utility.Uri.UrlDecode(m_path);
m_rawurl = new Utility.Uri(m_useSSL ? "https" : "http", u.Host, m_path).ToString();
int port = u.Port;
@@ -172,7 +172,7 @@ namespace Duplicati.Library.Backend {
//IIS uses %20 for spaces and %2B for +
//Apache uses %20 for spaces and + for +
- string name = System.Web.HttpUtility.UrlDecode(n.InnerText.Replace("+", "%2B"));
+ string name = Library.Utility.Uri.UrlDecode(n.InnerText.Replace("+", "%2B"));
string cmp_path;
@@ -186,7 +186,9 @@ namespace Duplicati.Library.Backend cmp_path = m_rawurlPort;
else if (name.StartsWith(m_path))
cmp_path = m_path;
- else if (name.StartsWith(m_sanitizedUrl))
+ else if (name.StartsWith("/" + m_path))
+ cmp_path = "/" + m_path;
+ else if (name.StartsWith(m_sanitizedUrl))
cmp_path = m_sanitizedUrl;
else if (name.StartsWith(m_reverseProtocolUrl))
cmp_path = m_reverseProtocolUrl;
@@ -332,7 +334,7 @@ namespace Duplicati.Library.Backend private System.Net.HttpWebRequest CreateRequest(string remotename)
{
- System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(m_url + System.Web.HttpUtility.UrlEncode(remotename).Replace("+", "%20"));
+ System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create(m_url + Library.Utility.Uri.UrlEncode(remotename).Replace("+", "%20"));
if (m_useIntegratedAuthentication)
{
req.UseDefaultCredentials = true;
diff --git a/Duplicati/Library/Compression/Duplicati.Library.Compression.csproj b/Duplicati/Library/Compression/Duplicati.Library.Compression.csproj index 420216a51..3e27196db 100644 --- a/Duplicati/Library/Compression/Duplicati.Library.Compression.csproj +++ b/Duplicati/Library/Compression/Duplicati.Library.Compression.csproj @@ -37,8 +37,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
<Reference Include="SharpCompress">
<HintPath>..\..\..\thirdparty\SharpCompress\SharpCompress.dll</HintPath>
</Reference>
diff --git a/Duplicati/Library/DynamicLoader/Duplicati.Library.DynamicLoader.csproj b/Duplicati/Library/DynamicLoader/Duplicati.Library.DynamicLoader.csproj index affd0a42d..37d80f7a5 100644 --- a/Duplicati/Library/DynamicLoader/Duplicati.Library.DynamicLoader.csproj +++ b/Duplicati/Library/DynamicLoader/Duplicati.Library.DynamicLoader.csproj @@ -37,9 +37,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Web" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
diff --git a/Duplicati/Library/Encryption/Duplicati.Library.Encryption.csproj b/Duplicati/Library/Encryption/Duplicati.Library.Encryption.csproj index 0eab4405d..85068a3d3 100644 --- a/Duplicati/Library/Encryption/Duplicati.Library.Encryption.csproj +++ b/Duplicati/Library/Encryption/Duplicati.Library.Encryption.csproj @@ -37,12 +37,8 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Drawing" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
<Reference Include="SharpAESCrypt">
- <HintPath>..\..\..\thirdparty\SharpAESCrypt\SharpAESCrypt.exe</HintPath>
+ <HintPath>..\..\..\packages\SharpAESCrypt.exe.1.3\lib\net20\SharpAESCrypt.exe</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -71,6 +67,7 @@ <ItemGroup>
<None Include="app.config" />
<None Include="Duplicati.snk" />
+ <None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
diff --git a/Duplicati/Library/Encryption/packages.config b/Duplicati/Library/Encryption/packages.config new file mode 100644 index 000000000..2f8a57881 --- /dev/null +++ b/Duplicati/Library/Encryption/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="SharpAESCrypt.exe" version="1.3" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Interface/Duplicati.Library.Interface.csproj b/Duplicati/Library/Interface/Duplicati.Library.Interface.csproj index 867a08adb..0957eaa0e 100644 --- a/Duplicati/Library/Interface/Duplicati.Library.Interface.csproj +++ b/Duplicati/Library/Interface/Duplicati.Library.Interface.csproj @@ -39,9 +39,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Windows.Forms" />
- <Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="CommandLineArgument.cs" />
diff --git a/Duplicati/Library/Logging/Duplicati.Library.Logging.csproj b/Duplicati/Library/Logging/Duplicati.Library.Logging.csproj index ded01d125..db9e22960 100644 --- a/Duplicati/Library/Logging/Duplicati.Library.Logging.csproj +++ b/Duplicati/Library/Logging/Duplicati.Library.Logging.csproj @@ -37,8 +37,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="ILog.cs" />
diff --git a/Duplicati/Library/Main/Duplicati.Library.Main.csproj b/Duplicati/Library/Main/Duplicati.Library.Main.csproj index fd79cc068..d46afc47f 100644 --- a/Duplicati/Library/Main/Duplicati.Library.Main.csproj +++ b/Duplicati/Library/Main/Duplicati.Library.Main.csproj @@ -8,7 +8,7 @@ <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Duplicati.Library.Main</RootNamespace>
<AssemblyName>Duplicati.Library.Main</AssemblyName>
- <SignAssembly>True</SignAssembly>
+ <SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -36,13 +36,12 @@ <WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
- </Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
- <Reference Include="System.Core" />
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Options.cs" />
@@ -148,6 +147,7 @@ <ItemGroup>
<None Include="app.config" />
<None Include="Duplicati.snk" />
+ <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Database\Database schema\Schema.sql" />
diff --git a/Duplicati/Library/Main/packages.config b/Duplicati/Library/Main/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Library/Main/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj b/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj index c5705e0a2..d1a0d8054 100644 --- a/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj +++ b/Duplicati/Library/Modules/Builtin/Duplicati.Library.Modules.Builtin.csproj @@ -42,13 +42,14 @@ <HintPath>..\..\..\..\thirdparty\DnsLite\DnsLib.dll</HintPath>
</Reference>
<Reference Include="System" />
- <Reference Include="System.Data" />
<Reference Include="System.Net" />
- <Reference Include="System.Xml" />
+ <Reference Include="Mono.Security" />
<Reference Include="agsXMPP">
- <HintPath>..\..\..\..\thirdparty\agsXMPP\agsXMPP.dll</HintPath>
+ <HintPath>..\..\..\..\packages\agsXMPP.1.1.1.0\lib\agsXMPP.dll</HintPath>
+ </Reference>
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
- <Reference Include="Mono.Security" />
</ItemGroup>
<ItemGroup>
<Compile Include="ConsolePasswordInput.cs" />
@@ -91,6 +92,7 @@ <Link>mozroots.exe</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
+ <None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
diff --git a/Duplicati/Library/Modules/Builtin/packages.config b/Duplicati/Library/Modules/Builtin/packages.config new file mode 100644 index 000000000..0c4373a05 --- /dev/null +++ b/Duplicati/Library/Modules/Builtin/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="agsXMPP" version="1.1.1.0" targetFramework="net45" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj b/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj index 4c485ce0e..d2d741d6c 100644 --- a/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj +++ b/Duplicati/Library/Snapshots/Duplicati.Library.Snapshots.csproj @@ -9,7 +9,7 @@ <RootNamespace>Duplicati.Library.Snapshots</RootNamespace>
<AssemblyName>Duplicati.Library.Snapshots</AssemblyName>
<FileAlignment>512</FileAlignment>
- <SignAssembly>true</SignAssembly>
+ <SignAssembly>false</SignAssembly>
<AssemblyOriginatorKeyFile>Duplicati.snk</AssemblyOriginatorKeyFile>
<FileUpgradeFlags>
</FileUpgradeFlags>
@@ -39,21 +39,39 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
+ <Reference Include="UnixSupport">
+ <HintPath>..\..\..\thirdparty\UnixSupport\UnixSupport.dll</HintPath>
+ </Reference>
+ <Reference Include="System.Core" />
<Reference Include="AlphaFS">
- <HintPath>..\..\..\thirdparty\alphavss\Bin\AlphaFS.dll</HintPath>
+ <HintPath>..\..\..\packages\AlphaFS.2.0.1\lib\net45\AlphaFS.dll</HintPath>
+ </Reference>
+ <Reference Include="AlphaVSS.51.x86">
+ <HintPath>..\..\..\packages\AlphaVSS.1.2.4000.3\lib\net40\AlphaVSS.51.x86.dll</HintPath>
+ </Reference>
+ <Reference Include="AlphaVSS.52.x64">
+ <HintPath>..\..\..\packages\AlphaVSS.1.2.4000.3\lib\net40\AlphaVSS.52.x64.dll</HintPath>
+ </Reference>
+ <Reference Include="AlphaVSS.52.x86">
+ <HintPath>..\..\..\packages\AlphaVSS.1.2.4000.3\lib\net40\AlphaVSS.52.x86.dll</HintPath>
+ </Reference>
+ <Reference Include="AlphaVSS.60.x64">
+ <HintPath>..\..\..\packages\AlphaVSS.1.2.4000.3\lib\net40\AlphaVSS.60.x64.dll</HintPath>
+ </Reference>
+ <Reference Include="AlphaVSS.60.x86">
+ <HintPath>..\..\..\packages\AlphaVSS.1.2.4000.3\lib\net40\AlphaVSS.60.x86.dll</HintPath>
</Reference>
<Reference Include="AlphaVSS.Common">
- <HintPath>..\..\..\thirdparty\alphavss\Bin\AlphaVSS.Common.dll</HintPath>
+ <HintPath>..\..\..\packages\AlphaVSS.1.2.4000.3\lib\net40\AlphaVSS.Common.dll</HintPath>
</Reference>
- <Reference Include="UnixSupport">
- <HintPath>..\..\..\thirdparty\UnixSupport\UnixSupport.dll</HintPath>
+ <Reference Include="AlphaShadow">
+ <HintPath>..\..\..\packages\AlphaVSS.1.2.4000.3\lib\net40\AlphaShadow.exe</HintPath>
+ </Reference>
+ <Reference Include="SnapshotQuery">
+ <HintPath>..\..\..\packages\AlphaVSS.1.2.4000.3\lib\net40\SnapshotQuery.exe</HintPath>
</Reference>
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
<Reference Include="Newtonsoft.Json">
- <HintPath>..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
+ <HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -105,26 +123,7 @@ <Content Include="lvm-scripts\remove-lvm-snapshot.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
- <Content Include="..\..\..\thirdparty\alphavss\platform\AlphaVSS.51.x86.dll">
- <Link>alphavss\AlphaVSS.51.x86.dll</Link>
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="..\..\..\thirdparty\alphavss\platform\AlphaVSS.52.x64.dll">
- <Link>alphavss\AlphaVSS.52.x64.dll</Link>
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="..\..\..\thirdparty\alphavss\platform\AlphaVSS.52.x86.dll">
- <Link>alphavss\AlphaVSS.52.x86.dll</Link>
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="..\..\..\thirdparty\alphavss\platform\AlphaVSS.60.x64.dll">
- <Link>alphavss\AlphaVSS.60.x64.dll</Link>
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
- <Content Include="..\..\..\thirdparty\alphavss\platform\AlphaVSS.60.x86.dll">
- <Link>alphavss\AlphaVSS.60.x86.dll</Link>
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
+ <None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
diff --git a/Duplicati/Library/Snapshots/SystemIOWindows.cs b/Duplicati/Library/Snapshots/SystemIOWindows.cs index 8af03f818..cba47b071 100644 --- a/Duplicati/Library/Snapshots/SystemIOWindows.cs +++ b/Duplicati/Library/Snapshots/SystemIOWindows.cs @@ -19,6 +19,7 @@ using System; using System.Linq;
using System.Collections.Generic;
using System.Security.AccessControl;
+using System.IO;
namespace Duplicati.Library.Snapshots
@@ -176,7 +177,7 @@ namespace Duplicati.Library.Snapshots catch (System.IO.PathTooLongException) { }
catch (System.ArgumentException) { }
- return Alphaleonis.Win32.Filesystem.File.Open(PrefixWithUNC(path), Alphaleonis.Win32.Filesystem.FileMode.Open, Alphaleonis.Win32.Filesystem.FileAccess.Read, Alphaleonis.Win32.Filesystem.FileShare.ReadWrite);
+ return Alphaleonis.Win32.Filesystem.File.Open(PrefixWithUNC(path), FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
}
public System.IO.Stream FileOpenWrite(string path)
@@ -199,7 +200,7 @@ namespace Duplicati.Library.Snapshots catch (System.IO.PathTooLongException) { }
catch (System.ArgumentException) { }
- return Alphaleonis.Win32.Filesystem.File.Open(PrefixWithUNC(path), Alphaleonis.Win32.Filesystem.FileMode.OpenOrCreate, Alphaleonis.Win32.Filesystem.FileAccess.ReadWrite, Alphaleonis.Win32.Filesystem.FileShare.Read);
+ return Alphaleonis.Win32.Filesystem.File.Open(PrefixWithUNC(path), FileMode.OpenOrCreate, FileAccess.ReadWrite, FileShare.Read);
}
public System.IO.Stream FileCreate(string path)
@@ -233,7 +234,7 @@ namespace Duplicati.Library.Snapshots catch (System.IO.PathTooLongException) { }
catch (System.ArgumentException) { }
- Alphaleonis.Win32.Filesystem.File.SetAttributes(PrefixWithUNC(path), (Alphaleonis.Win32.Filesystem.FileAttributes)attributes);
+ Alphaleonis.Win32.Filesystem.File.SetAttributes(PrefixWithUNC(path), (FileAttributes)attributes);
}
public void CreateSymlink(string symlinkfile, string target, bool asDir)
diff --git a/Duplicati/Library/Snapshots/WinNativeMethods.cs b/Duplicati/Library/Snapshots/WinNativeMethods.cs index b738f589d..24ce042c4 100644 --- a/Duplicati/Library/Snapshots/WinNativeMethods.cs +++ b/Duplicati/Library/Snapshots/WinNativeMethods.cs @@ -16,6 +16,9 @@ // License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
//
+using System.Security.AccessControl;
+
+
#endregion
using System;
using System.Collections.Generic;
@@ -165,7 +168,7 @@ namespace Duplicati.Library.Snapshots throw new Win32Exception(Marshal.GetLastWin32Error());
//TODO: We need to be able to seek to pos 0
- return new Alphaleonis.Win32.Filesystem.BackupFileStream(hFile, Alphaleonis.Win32.Filesystem.FileSystemRights.Read);
+ return new Alphaleonis.Win32.Filesystem.BackupFileStream(hFile, FileSystemRights.Read);
}
/// <summary>
diff --git a/Duplicati/Library/Snapshots/packages.config b/Duplicati/Library/Snapshots/packages.config new file mode 100644 index 000000000..ff4bef1ee --- /dev/null +++ b/Duplicati/Library/Snapshots/packages.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="AlphaFS" version="2.0.1" targetFramework="net45" /> + <package id="AlphaVSS" version="1.2.4000.3" targetFramework="net45" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj b/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj index 19e8479a7..0e85ce05d 100644 --- a/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj +++ b/Duplicati/Library/UsageReporter/Duplicati.Library.UsageReporter.csproj @@ -32,10 +32,10 @@ <ItemGroup> <Reference Include="System" /> <Reference Include="Newtonsoft.Json"> - <HintPath>..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath> + <HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath> </Reference> <Reference Include="CoCoL"> - <HintPath>..\..\..\thirdparty\CoCoL\CoCoL.dll</HintPath> + <HintPath>..\..\..\packages\CoCoL.1.5.0\lib\net45\CoCoL.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -64,4 +64,7 @@ <Name>Duplicati.Library.Logging</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <None Include="packages.config" /> + </ItemGroup> </Project>
\ No newline at end of file diff --git a/Duplicati/Library/UsageReporter/packages.config b/Duplicati/Library/UsageReporter/packages.config new file mode 100644 index 000000000..d325c137a --- /dev/null +++ b/Duplicati/Library/UsageReporter/packages.config @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="CoCoL" version="1.5.0" targetFramework="net45" /> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Library/Utility/Duplicati.Library.Utility.csproj b/Duplicati/Library/Utility/Duplicati.Library.Utility.csproj index 2f0eafa66..d5a4696bc 100644 --- a/Duplicati/Library/Utility/Duplicati.Library.Utility.csproj +++ b/Duplicati/Library/Utility/Duplicati.Library.Utility.csproj @@ -37,8 +37,6 @@ </PropertyGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
diff --git a/Duplicati/License/Duplicati.License.csproj b/Duplicati/License/Duplicati.License.csproj index e821f6b73..a7b2eadc9 100644 --- a/Duplicati/License/Duplicati.License.csproj +++ b/Duplicati/License/Duplicati.License.csproj @@ -311,8 +311,6 @@ </ItemGroup>
<ItemGroup>
<Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="LicenseEntry.cs" />
diff --git a/Duplicati/License/acknowledgements.txt b/Duplicati/License/acknowledgements.txt index 381b00ed7..ed4815fb2 100644 --- a/Duplicati/License/acknowledgements.txt +++ b/Duplicati/License/acknowledgements.txt @@ -14,6 +14,7 @@ Software Development: Stefan Lück
Tim Mylemans
Xelio Cheong
+ Michal Naiman
The theme for Duplicati (ngax):
Alexander Franzelin
diff --git a/Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj b/Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj index 2a890297d..6b5bcca4a 100644 --- a/Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj +++ b/Duplicati/Server/Duplicati.Server.Serialization/Duplicati.Server.Serialization.csproj @@ -40,13 +40,8 @@ <ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
<Reference Include="Newtonsoft.Json">
- <HintPath>..\..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
+ <HintPath>..\..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -81,6 +76,7 @@ </ItemGroup>
<ItemGroup>
<None Include="Duplicati.snk" />
+ <None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
diff --git a/Duplicati/Server/Duplicati.Server.Serialization/packages.config b/Duplicati/Server/Duplicati.Server.Serialization/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Server/Duplicati.Server.Serialization/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Server/Duplicati.Server.csproj b/Duplicati/Server/Duplicati.Server.csproj index c100f69e4..c7af6fda2 100644 --- a/Duplicati/Server/Duplicati.Server.csproj +++ b/Duplicati/Server/Duplicati.Server.csproj @@ -11,7 +11,7 @@ <FileAlignment>512</FileAlignment>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkProfile />
- <SignAssembly>true</SignAssembly>
+ <SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
@@ -45,20 +45,16 @@ <ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
<Reference Include="UnixSupport">
<HintPath>..\..\thirdparty\UnixSupport\UnixSupport.dll</HintPath>
</Reference>
- <Reference Include="Newtonsoft.Json">
- <HintPath>..\..\thirdparty\Json.NET\Newtonsoft.Json.dll</HintPath>
- </Reference>
<Reference Include="HttpServer">
<HintPath>..\..\thirdparty\HttpServer\HttpServer.dll</HintPath>
</Reference>
+ <Reference Include="System.Data" />
+ <Reference Include="Newtonsoft.Json">
+ <HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
+ </Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="EventPollNotify.cs" />
@@ -128,6 +124,7 @@ <EmbeddedResource Include="Database\Database schema\1. Add Notifications.sql" />
<EmbeddedResource Include="Database\Database schema\2. Add UIStorage.sql" />
<EmbeddedResource Include="Database\Database schema\3. Add temp file storage.sql" />
+ <None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CommandLine\BackendTester\Duplicati.CommandLine.BackendTester.csproj">
diff --git a/Duplicati/Server/packages.config b/Duplicati/Server/packages.config new file mode 100644 index 000000000..e1fae9c6a --- /dev/null +++ b/Duplicati/Server/packages.config @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="utf-8"?> +<packages> + <package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" /> +</packages>
\ No newline at end of file diff --git a/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js b/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js index ffeba30e8..65ee84aa7 100644 --- a/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js +++ b/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js @@ -165,16 +165,6 @@ backupApp.controller('EditBackupController', function ($scope, $routeParams, $lo if (!$scope.ExcludeLargeFiles) delete opts['--skip-files-larger-than']; - if (($scope.ExcludeAttributes || []).length > 0) { - opts['--exclude-files-attributes'] = $scope.ExcludeAttributes.join(','); - - while (opts['--exclude-files-attributes'].indexOf(',') == 0) - opts['--exclude-files-attributes'] = opts['--exclude-files-attributes'].substr(1); - - if (opts['--exclude-files-attributes'] == '') - delete opts['--exclude-files-attributes']; - } - var encryptionEnabled = true; if ((opts['encryption-module'] || '').length == 0) { opts['--no-encryption'] = 'true'; @@ -184,6 +174,24 @@ backupApp.controller('EditBackupController', function ($scope, $routeParams, $lo if (!AppUtils.parse_extra_options(scope.ExtendedOptions, opts)) return false; + var exclattr = ($scope.ExcludeAttributes || []).concat((opts['--exclude-files-attributes'] || '').split(',')); + var exclmap = { '': true }; + + // Remove duplicates + for (var i = exclattr.length - 1; i >= 0; i--) { + exclattr[i] = (exclattr[i] || '').trim(); + var cmp = exclattr[i].toLowerCase(); + if (exclmap[cmp]) + exclattr.splice(i, 1); + else + exclmap[cmp] = true; + } + + if (exclattr.length == 0) + delete opts['--exclude-files-attributes']; + else + opts['--exclude-files-attributes'] = exclattr.join(',') + if (($scope.Backup.Name || '').trim().length == 0) { DialogService.dialog('Missing name', 'You must enter a name for the backup'); $scope.CurrentStep = 0; @@ -411,7 +419,38 @@ backupApp.controller('EditBackupController', function ($scope, $routeParams, $lo $scope.ExcludeLargeFiles = (extopts['--skip-files-larger-than'] || '').trim().length > 0; if ($scope.ExcludeLargeFiles) $scope.Options['--skip-files-larger-than'] = extopts['--skip-files-larger-than']; - $scope.ExcludeAttributes = (extopts['--exclude-files-attributes'] || '').split(','); + + var exclattr = (extopts['--exclude-files-attributes'] || '').split(','); + var dispattr = []; + var dispmap = {}; + + for (var i = exclattr.length - 1; i >= 0; i--) { + var cmp = (exclattr[i] || '').trim().toLowerCase(); + + // Remove empty entries + if (cmp.length == 0) { + exclattr.splice(i, 1); + continue; + } + + for (var j = scope.fileAttributes.length - 1; j >= 0; j--) { + if (scope.fileAttributes[j].value == cmp) { + // Remote duplicates + if (dispmap[cmp] == null) { + dispattr.push(scope.fileAttributes[j].value); + dispmap[cmp] = true; + } + exclattr.splice(i, 1); + break; + } + } + } + + $scope.ExcludeAttributes = dispattr; + if (exclattr.length == 0) + delete extopts['--exclude-files-attributes']; + else + extopts['--exclude-files-attributes'] = exclattr.join(','); $scope.RepeatPasshrase = $scope.Options['passphrase']; @@ -426,7 +465,7 @@ backupApp.controller('EditBackupController', function ($scope, $routeParams, $lo $scope.KeepType = 'versions'; } - var delopts = ['--skip-files-larger-than', '--exclude-files-attributes', '--no-encryption'] + var delopts = ['--skip-files-larger-than', '--no-encryption'] for(var n in delopts) delete extopts[delopts[n]]; diff --git a/Duplicati/Server/webroot/ngax/scripts/directives/backupEditUri.js b/Duplicati/Server/webroot/ngax/scripts/directives/backupEditUri.js index ff8b8689f..5644f0e06 100644 --- a/Duplicati/Server/webroot/ngax/scripts/directives/backupEditUri.js +++ b/Duplicati/Server/webroot/ngax/scripts/directives/backupEditUri.js @@ -244,9 +244,31 @@ backupApp.directive('backupEditUri', function() { var parts = AppUtils.decode_uri(scope.uri); - for(var n in scope.SystemInfo.GroupedBackendModules) - if (scope.SystemInfo.GroupedBackendModules[n].Key == parts['backend-type']) + for(var n in scope.SystemInfo.GroupedBackendModules) { + if (scope.SystemInfo.GroupedBackendModules[n].Key == parts['backend-type']) { scope.Backend = $scope.SystemInfo.GroupedBackendModules[n]; + break; + } + + if ((scope.SystemInfo.GroupedBackendModules[n].Key + 's') == parts['backend-type']) { + var hasssl = false; + var bk = scope.SystemInfo.GroupedBackendModules[n]; + + for(var o in bk.Options) { + if (bk.Options[o].Name == 'use-ssl') { + hasssl = true; + break; + } + } + + if (hasssl) { + scope.Backend = bk; + parts['--use-ssl'] = true; + break; + } + } + } + scope.Username = parts['--auth-username']; scope.Password = parts['--auth-password']; diff --git a/Duplicati/Server/webroot/ngax/scripts/directives/parseAdvancedOption.js b/Duplicati/Server/webroot/ngax/scripts/directives/parseAdvancedOption.js index 49a146e5f..a8140d67c 100644 --- a/Duplicati/Server/webroot/ngax/scripts/directives/parseAdvancedOption.js +++ b/Duplicati/Server/webroot/ngax/scripts/directives/parseAdvancedOption.js @@ -167,6 +167,9 @@ backupApp.directive('parseAdvancedOptionSizeNumber', function(AppUtils) { return { restrict: 'A', require: ['ngModel'], + scope: { + parseAdvancedOptionSizeNumber: '@' + }, link: function(scope, element, attr, ctrl) { var name = null; @@ -192,7 +195,12 @@ backupApp.directive('parseAdvancedOptionSizeNumber', function(AppUtils) { } else { - multiplier = parts[1]; + if (scope.parseAdvancedOptionSizeNumber == 'uppercase') + multiplier = parts[1].toUpperCase(); + else if (scope.parseAdvancedOptionSizeNumber == 'lowercase') + multiplier = parts[1].toLowerCase(); + else + multiplier = parts[1]; return parseInt(parts[0], 10); } } @@ -211,6 +219,9 @@ backupApp.directive('parseAdvancedOptionSizeMultiplier', function(AppUtils) { return { restrict: 'A', require: ['ngModel'], + scope: { + parseAdvancedOptionSizeMultiplier: '@' + }, link: function(scope, element, attr, ctrl) { var name = null; @@ -237,7 +248,12 @@ backupApp.directive('parseAdvancedOptionSizeMultiplier', function(AppUtils) { else { number = parseInt(parts[0]); - return parts[1]; + if (scope.parseAdvancedOptionSizeMultiplier == 'uppercase') + return parts[1].toUpperCase(); + else if (scope.parseAdvancedOptionSizeMultiplier == 'lowercase') + return parts[1].toLowerCase(); + else + return parts[1]; } } else diff --git a/Duplicati/Server/webroot/ngax/scripts/directives/parseSizeNumber.js b/Duplicati/Server/webroot/ngax/scripts/directives/parseSizeNumber.js index c04504e57..07409b9e6 100644 --- a/Duplicati/Server/webroot/ngax/scripts/directives/parseSizeNumber.js +++ b/Duplicati/Server/webroot/ngax/scripts/directives/parseSizeNumber.js @@ -2,6 +2,9 @@ backupApp.directive('parseSizeNumber', function(AppUtils) { return { restrict: 'A', require: ['ngModel'], + scope: { + parseSizeNumber: '@' + }, link: function(scope, element, attr, ctrl) { var multiplier = null; @@ -17,7 +20,12 @@ backupApp.directive('parseSizeNumber', function(AppUtils) { return null; } - multiplier = parts[1]; + if (scope.parseSizeNumber == 'uppercase') + multiplier = parts[1].toUpperCase(); + else if (scope.parseSizeNumber == 'lowercase') + multiplier = parts[1].toLowerCase(); + else + multiplier = parts[1]; return parts[0]; }); @@ -28,6 +36,9 @@ backupApp.directive('parseSizeNumber', function(AppUtils) { backupApp.directive('parseSizeMultiplier', function(AppUtils) { return { restrict: 'A', + scope: { + parseSizeMultiplier: '@' + }, require: ['ngModel'], link: function(scope, element, attr, ctrl) { @@ -45,7 +56,12 @@ backupApp.directive('parseSizeMultiplier', function(AppUtils) { } number = parts[0]; - return parts[1]; + if (scope.parseSizeMultiplier == 'uppercase') + return parts[1].toUpperCase(); + else if (scope.parseSizeMultiplier == 'lowercase') + return parts[1].toLowerCase(); + else + return parts[1]; }); } }; diff --git a/Duplicati/Server/webroot/ngax/templates/addoredit.html b/Duplicati/Server/webroot/ngax/templates/addoredit.html index 9a34d68d6..775ab16e9 100755 --- a/Duplicati/Server/webroot/ngax/templates/addoredit.html +++ b/Duplicati/Server/webroot/ngax/templates/addoredit.html @@ -152,8 +152,8 @@ <input id="exclude-large-files" type="checkbox" class="simple-checkbox" ng-model="ExcludeLargeFiles" /> <label for="exclude-large-files">Files larger than:</label> - <input type="number" parse-size-number ng-model="Options['--skip-files-larger-than']" id="exclude-larger-than-number" ng-disabled="!ExcludeLargeFiles" value="1" /> - <select parse-size-multiplier id="exclude-larger-than-multiplier" ng-model="Options['--skip-files-larger-than']" ng-disabled="!ExcludeLargeFiles" ng-options="item.value as item.name for item in AppUtils.fileSizeMultipliers"> + <input type="number" parse-size-number="uppercase" ng-model="Options['--skip-files-larger-than']" id="exclude-larger-than-number" ng-disabled="!ExcludeLargeFiles" value="1" /> + <select parse-size-multiplier="uppercase" id="exclude-larger-than-multiplier" ng-model="Options['--skip-files-larger-than']" ng-disabled="!ExcludeLargeFiles" ng-options="item.value as item.name for item in AppUtils.fileSizeMultipliers"> </select> </div> </div> @@ -219,12 +219,11 @@ <h2>General options</h2> <div class="input multiple text select maxSize"> <label for="dblockSizeNumber">Max backup file size</label> - <input type="number" class="number" parse-size-number id="dblockSizeNumber" ng-model="Options['dblock-size']" /> - <select parse-size-multiplier id="dblockSizeMultiplier" ng-model="Options['dblock-size']"> - <option value="kb">KByte</option> - <option value="mb">MByte</option> - <option value="gb">GByte</option> - <option value="tb">TByte</option> + <input type="number" class="number" parse-size-number="uppercase" id="dblockSizeNumber" ng-model="Options['dblock-size']" /> + <select parse-size-multiplier="uppercase" id="dblockSizeMultiplier" ng-model="Options['dblock-size']" ng-options="item.value as item.name for item in AppUtils.fileSizeMultipliers"></select> + <option value="MB">MByte</option> + <option value="GB">GByte</option> + <option value="TB">TByte</option> </select> </div> <div class="input multiple text select keepBackups"> diff --git a/Duplicati/Server/webroot/ngax/templates/advancedoptionseditor.html b/Duplicati/Server/webroot/ngax/templates/advancedoptionseditor.html index 59c5a93a5..aef38a1aa 100644 --- a/Duplicati/Server/webroot/ngax/templates/advancedoptionseditor.html +++ b/Duplicati/Server/webroot/ngax/templates/advancedoptionseditor.html @@ -11,8 +11,8 @@ <input ng-if="getInputType(item) == 'int'" type="number" ng-model="$parent.ngModel[$index]" parse-advanced-option-integer ></input> <div ng-if="getInputType(item) == 'size'" class="input type multiple"> - <input type="number" parse-advanced-option-size-number ng-model="$parent.ngModel[$index]" /> - <select parse-advanced-option-size-multiplier ng-model="$parent.ngModel[$index]"> + <input type="number" parse-advanced-option-size-number="lowercase" ng-model="$parent.ngModel[$index]" /> + <select parse-advanced-option-size-multiplier="lowercase" ng-model="$parent.ngModel[$index]"> <option value="kb">KByte</option> <option value="mb">MByte</option> <option value="gb">GByte</option> |