Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/duplicati/duplicati.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Skovhede <kenneth@hexad.dk>2016-03-14 23:35:31 +0300
committerKenneth Skovhede <kenneth@hexad.dk>2016-03-14 23:35:31 +0300
commita02339757b6a370f14ffd0e4598d193a262e7157 (patch)
tree15a623dd3b570e389f074b9d0f32514e0acdbbbc
parent3bdd1abe4b1053da3b016544372028499e51ddc4 (diff)
parent34bfd0513b961dff82479f2fb560a4615a5642eb (diff)
Merge branch 'kenneth_work'
-rw-r--r--Duplicati/Library/Main/Operation/BackupHandler.cs12
-rw-r--r--Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs2
-rw-r--r--Duplicati/Library/Main/Operation/RepairHandler.cs6
-rw-r--r--Duplicati/Library/Main/Operation/RestoreHandler.cs20
-rw-r--r--Duplicati/Library/Main/Operation/TestHandler.cs4
-rw-r--r--Duplicati/Library/Main/Strings.cs9
-rw-r--r--Duplicati/Library/Main/Utility.cs4
-rw-r--r--Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js26
-rw-r--r--Duplicati/Server/webroot/ngax/styles/styles2.css4
-rw-r--r--Duplicati/Server/webroot/ngax/templates/about.html2
-rw-r--r--Duplicati/Server/webroot/ngax/templates/updatechangelog.html2
11 files changed, 50 insertions, 41 deletions
diff --git a/Duplicati/Library/Main/Operation/BackupHandler.cs b/Duplicati/Library/Main/Operation/BackupHandler.cs
index 37cad0a37..37afe5e2f 100644
--- a/Duplicati/Library/Main/Operation/BackupHandler.cs
+++ b/Duplicati/Library/Main/Operation/BackupHandler.cs
@@ -54,7 +54,7 @@ namespace Duplicati.Library.Main.Operation
m_symlinkPolicy = m_options.SymlinkPolicy;
if (options.AllowPassphraseChange)
- throw new Exception(Strings.Foresthash.PassphraseChangeUnsupported);
+ throw new Exception(Strings.Common.PassphraseChangeUnsupported);
}
@@ -253,7 +253,7 @@ namespace Duplicati.Library.Main.Operation
throw;
else if (options.SnapShotStrategy == Options.OptimizationStrategy.On)
{
- log.AddWarning(Strings.RSyncDir.SnapshotFailedError(ex.ToString()), ex);
+ log.AddWarning(Strings.Common.SnapshotFailedError(ex.ToString()), ex);
}
}
@@ -652,14 +652,14 @@ namespace Duplicati.Library.Main.Operation
m_filehasher = System.Security.Cryptography.HashAlgorithm.Create(m_options.FileHashAlgorithm);
if (m_blockhasher == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
if (m_filehasher == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(m_options.FileHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(m_options.FileHashAlgorithm));
if (!m_blockhasher.CanReuseTransform)
- throw new Exception(Strings.Foresthash.InvalidCryptoSystem(m_options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidCryptoSystem(m_options.BlockHashAlgorithm));
if (!m_filehasher.CanReuseTransform)
- throw new Exception(Strings.Foresthash.InvalidCryptoSystem(m_options.FileHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidCryptoSystem(m_options.FileHashAlgorithm));
m_database.VerifyConsistency(null, m_options.Blocksize, m_options.BlockhashSize);
// If there is no filter, we set an empty filter to simplify the code
diff --git a/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs b/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
index ce68dbb63..360f08d9c 100644
--- a/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
+++ b/Duplicati/Library/Main/Operation/RecreateDatabaseHandler.cs
@@ -250,7 +250,7 @@ namespace Duplicati.Library.Main.Operation
{
var hashalg = System.Security.Cryptography.HashAlgorithm.Create(m_options.BlockHashAlgorithm);
if (hashalg == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
var hashsize = hashalg.HashSize / 8;
//Grab all index files, and update the block table
diff --git a/Duplicati/Library/Main/Operation/RepairHandler.cs b/Duplicati/Library/Main/Operation/RepairHandler.cs
index 039591fd1..3f316aa8d 100644
--- a/Duplicati/Library/Main/Operation/RepairHandler.cs
+++ b/Duplicati/Library/Main/Operation/RepairHandler.cs
@@ -20,7 +20,7 @@ namespace Duplicati.Library.Main.Operation
m_result = result;
if (options.AllowPassphraseChange)
- throw new Exception(Strings.Foresthash.PassphraseChangeUnsupported);
+ throw new Exception(Strings.Common.PassphraseChangeUnsupported);
}
public void Run(Library.Utility.IFilter filter = null)
@@ -107,9 +107,9 @@ namespace Duplicati.Library.Main.Operation
var hashsize = blockhasher.HashSize / 8;
if (blockhasher == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
if (!blockhasher.CanReuseTransform)
- throw new Exception(Strings.Foresthash.InvalidCryptoSystem(m_options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidCryptoSystem(m_options.BlockHashAlgorithm));
var progress = 0;
var targetProgess = tp.ExtraVolumes.Count() + tp.MissingVolumes.Count() + tp.VerificationRequiredVolumes.Count();
diff --git a/Duplicati/Library/Main/Operation/RestoreHandler.cs b/Duplicati/Library/Main/Operation/RestoreHandler.cs
index 3898c5a08..67e665f29 100644
--- a/Duplicati/Library/Main/Operation/RestoreHandler.cs
+++ b/Duplicati/Library/Main/Operation/RestoreHandler.cs
@@ -126,14 +126,14 @@ namespace Duplicati.Library.Main.Operation
blockhasher = System.Security.Cryptography.HashAlgorithm.Create(m_options.BlockHashAlgorithm);
filehasher = System.Security.Cryptography.HashAlgorithm.Create(m_options.FileHashAlgorithm);
if (blockhasher == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
if (!blockhasher.CanReuseTransform)
- throw new Exception(Strings.Foresthash.InvalidCryptoSystem(m_options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidCryptoSystem(m_options.BlockHashAlgorithm));
if (filehasher == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(m_options.FileHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(m_options.FileHashAlgorithm));
if (!filehasher.CanReuseTransform)
- throw new Exception(Strings.Foresthash.InvalidCryptoSystem(m_options.FileHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidCryptoSystem(m_options.FileHashAlgorithm));
// Don't run this again
first = false;
@@ -347,14 +347,14 @@ namespace Duplicati.Library.Main.Operation
var blockhasher = System.Security.Cryptography.HashAlgorithm.Create(m_options.BlockHashAlgorithm);
var filehasher = System.Security.Cryptography.HashAlgorithm.Create(m_options.FileHashAlgorithm);
if (blockhasher == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(m_options.BlockHashAlgorithm));
if (!blockhasher.CanReuseTransform)
- throw new Exception(Strings.Foresthash.InvalidCryptoSystem(m_options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidCryptoSystem(m_options.BlockHashAlgorithm));
if (filehasher == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(m_options.FileHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(m_options.FileHashAlgorithm));
if (!filehasher.CanReuseTransform)
- throw new Exception(Strings.Foresthash.InvalidCryptoSystem(m_options.FileHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidCryptoSystem(m_options.FileHashAlgorithm));
if (!m_options.NoBackendverification)
{
@@ -494,8 +494,10 @@ namespace Duplicati.Library.Main.Operation
}
}
- if (fileErrors > 0 || brokenFiles.Count > 0)
+ if (fileErrors > 0 && brokenFiles.Count > 0)
m_result.AddMessage(string.Format("Failed to restore {0} files, additionally the following files failed to download, which may be the cause:{1}{2}", fileErrors, Environment.NewLine, string.Join(Environment.NewLine, brokenFiles)));
+ else if (fileErrors > 0)
+ m_result.AddMessage(string.Format("Failed to restore {0} files", fileErrors));
// Drop the temp tables
database.DropRestoreTable();
diff --git a/Duplicati/Library/Main/Operation/TestHandler.cs b/Duplicati/Library/Main/Operation/TestHandler.cs
index 7fa1b537a..208b537bf 100644
--- a/Duplicati/Library/Main/Operation/TestHandler.cs
+++ b/Duplicati/Library/Main/Operation/TestHandler.cs
@@ -154,9 +154,9 @@ namespace Duplicati.Library.Main.Operation
var blockhasher = System.Security.Cryptography.HashAlgorithm.Create(options.BlockHashAlgorithm);
if (blockhasher == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(options.BlockHashAlgorithm));
if (!blockhasher.CanReuseTransform)
- throw new Exception(Strings.Foresthash.InvalidCryptoSystem(options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidCryptoSystem(options.BlockHashAlgorithm));
var hashsize = blockhasher.HashSize / 8;
var parsedInfo = Volumes.VolumeBase.ParseFilename(vol.Name);
diff --git a/Duplicati/Library/Main/Strings.cs b/Duplicati/Library/Main/Strings.cs
index 8d276e727..12c7c0b0c 100644
--- a/Duplicati/Library/Main/Strings.cs
+++ b/Duplicati/Library/Main/Strings.cs
@@ -207,17 +207,14 @@ namespace Duplicati.Library.Main.Strings
public static string ForcelocaleLong { get { return LC.L(@"By default, your system locale and culture settings will be used. In some cases you may prefer to run with another locale, for example to get messages in another language. This option can be used to set the locale. Supply a blank string to choose the ""Invariant Cultute""."); } }
public static string EnablepipingShort{ get { return LC.L(@"Handle downloads with threaded pipes"); } }
public static string EnablepipingLong { get { return LC.L(@"Use this option to enable an experimental multithreaded download handling, that can significantly speed up restore operations or backup verifications depending on the hardware you're running on and your fileset. This operation mode is experimental and by default disabled."); } }
- }
+ }
- internal static class Foresthash
+ internal static class Common
{
public static string InvalidCryptoSystem(string algorithm) { return LC.L(@"The cryptolibrary does not support re-usable transforms for the hash algorithm {0}", algorithm); }
public static string InvalidHashAlgorithm(string algorithm) { return LC.L(@"The cryptolibrary does not support the hash algorithm {0}", algorithm); }
public static string PassphraseChangeUnsupported { get { return LC.L(@"The passphrase cannot be changed for an existing backup"); } }
- }
-
- internal static class RSyncDir
- {
public static string SnapshotFailedError(string message) { return LC.L(@"Failed to create a snapshot: {0}", message); }
}
+
}
diff --git a/Duplicati/Library/Main/Utility.cs b/Duplicati/Library/Main/Utility.cs
index 1adf8aa5f..884a78e82 100644
--- a/Duplicati/Library/Main/Utility.cs
+++ b/Duplicati/Library/Main/Utility.cs
@@ -49,9 +49,9 @@ namespace Duplicati.Library.Main
m_values = values;
var hasher = System.Security.Cryptography.HashAlgorithm.Create(options.BlockHashAlgorithm);
if (hasher == null)
- throw new Exception(Strings.Foresthash.InvalidHashAlgorithm(options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidHashAlgorithm(options.BlockHashAlgorithm));
if (!hasher.CanReuseTransform)
- throw new Exception(Strings.Foresthash.InvalidCryptoSystem(options.BlockHashAlgorithm));
+ throw new Exception(Strings.Common.InvalidCryptoSystem(options.BlockHashAlgorithm));
using (var ms = new System.IO.MemoryStream())
using (var w = new StreamWriter(ms, Encoding.UTF8))
diff --git a/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js b/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js
index 5024d100a..5816a4137 100644
--- a/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js
+++ b/Duplicati/Server/webroot/ngax/scripts/controllers/EditBackupController.js
@@ -15,9 +15,9 @@ backupApp.controller('EditBackupController', function ($scope, $routeParams, $lo
$scope.ExcludeLargeFiles = false;
$scope.fileAttributes = [
- {name: 'Hidden files', value: 'hidden'},
- {name: 'System files', value: 'system'},
- {name: 'Temporary files', value: 'temporary'}
+ {'name': 'Hidden files', 'value': 'hidden'},
+ {'name': 'System files', 'value': 'system'},
+ {'name': 'Temporary files', 'value': 'temporary'}
];
var scope = $scope;
@@ -41,7 +41,7 @@ backupApp.controller('EditBackupController', function ($scope, $routeParams, $lo
else if ((passphrase || '') == '')
scope.PassphraseScore = '';
else
- scope.PassphraseScore = (zxcvbn(passphrase) || {score: -1}).score;
+ scope.PassphraseScore = (zxcvbn(passphrase) || {'score': -1}).score;
scope.PassphraseScoreString = strengthMap[scope.PassphraseScore] || 'Unknown';
}
@@ -209,10 +209,10 @@ backupApp.controller('EditBackupController', function ($scope, $routeParams, $lo
return;
}
- if ($scope.KeepType == 'time')
- delete $scope.Options['keep-versions'];
- if ($scope.KeepType == 'versions')
- delete $scope.Options['keep-time'];
+ if ($scope.KeepType == 'time' || $scope.KeepType == '')
+ delete opts['keep-versions'];
+ if ($scope.KeepType == 'versions' || $scope.KeepType == '')
+ delete opts['keep-time'];
result.Backup.Settings = [];
for(var k in opts) {
@@ -405,12 +405,18 @@ backupApp.controller('EditBackupController', function ($scope, $routeParams, $lo
$scope.KeepType = '';
if (($scope.Options['keep-time'] || '').trim().length != 0)
+ {
$scope.KeepType = 'time';
+ }
else if (($scope.Options['keep-versions'] || '').trim().length != 0)
+ {
+ $scope.Options['keep-versions'] = parseInt($scope.Options['keep-versions']);
$scope.KeepType = 'versions';
+ }
- for(var n in ['--skip-files-larger-than', '--exclude-files-attributes', '--no-encryption'])
- delete extopts[n];
+ var delopts = ['--skip-files-larger-than', '--exclude-files-attributes', '--no-encryption']
+ for(var n in delopts)
+ delete extopts[delopts[n]];
$scope.ExtendedOptions = AppUtils.serializeAdvancedOptionsToArray(extopts);
diff --git a/Duplicati/Server/webroot/ngax/styles/styles2.css b/Duplicati/Server/webroot/ngax/styles/styles2.css
index e56b0cf43..ec1f160cf 100644
--- a/Duplicati/Server/webroot/ngax/styles/styles2.css
+++ b/Duplicati/Server/webroot/ngax/styles/styles2.css
@@ -600,3 +600,7 @@ ul.notification {
margin-top: -25px;
margin-left: 10px
}
+
+.fixed-width-font {
+ font-family: monospace;
+} \ No newline at end of file
diff --git a/Duplicati/Server/webroot/ngax/templates/about.html b/Duplicati/Server/webroot/ngax/templates/about.html
index 1d0467549..e4af441ee 100644
--- a/Duplicati/Server/webroot/ngax/templates/about.html
+++ b/Duplicati/Server/webroot/ngax/templates/about.html
@@ -32,7 +32,7 @@
</div>
<div ng-show="Page == 'changelog'">
- <div class="prewrapped-text">{{ChangeLog || 'Loading ...'}}</div>
+ <div class="prewrapped-text fixed-width-font">{{ChangeLog || 'Loading ...'}}</div>
</div>
<div ng-show="Page == 'licenses'" class="licenses">
diff --git a/Duplicati/Server/webroot/ngax/templates/updatechangelog.html b/Duplicati/Server/webroot/ngax/templates/updatechangelog.html
index dcf4c68c3..312727282 100644
--- a/Duplicati/Server/webroot/ngax/templates/updatechangelog.html
+++ b/Duplicati/Server/webroot/ngax/templates/updatechangelog.html
@@ -5,7 +5,7 @@
Current version is {{systeminfo.ServerVersionName}} ({{systeminfo.ServerVersion}})
</div>
- <div class="prewrapped-text">{{ChangeLog || 'Loading ...'}}</div>
+ <div class="prewrapped-text fixed-width-font">{{ChangeLog || 'Loading ...'}}</div>
<div class="buttons">
<a href class="button" ng-show="serverstate.UpdaterState == 'Waiting' &amp;&amp; serverstate.UpdatedVersion != null" ng-click="doInstall()">Install</a>