Merge pull request #6363 from duplicati/feature/dont-add-extra-dashes
No extra dashes on direct restore
This commit is contained in:
@@ -42,14 +42,20 @@ backupApp.controller('RestoreDirectController', function ($rootScope, $scope, $l
|
||||
var opts = {};
|
||||
var obj = {'Backup': {'TargetURL': $scope.TargetURL } };
|
||||
|
||||
if (($scope.EncryptionPassphrase || '') == '')
|
||||
opts['--no-encryption'] = 'true';
|
||||
else
|
||||
opts['passphrase'] = $scope.EncryptionPassphrase;
|
||||
|
||||
if (!AppUtils.parse_extra_options($scope.ExtendedOptions, opts))
|
||||
return false;
|
||||
|
||||
if (($scope.EncryptionPassphrase || '') == '')
|
||||
{
|
||||
opts['--no-encryption'] = 'true';
|
||||
delete opts['passphrase'];
|
||||
}
|
||||
else
|
||||
{
|
||||
opts['passphrase'] = $scope.EncryptionPassphrase;
|
||||
delete opts['--no-encryption'];
|
||||
}
|
||||
|
||||
obj.Backup.Settings = [];
|
||||
for(var k in opts) {
|
||||
obj.Backup.Settings.push({
|
||||
@@ -118,6 +124,8 @@ backupApp.controller('RestoreDirectController', function ($rootScope, $scope, $l
|
||||
if (tmpsettings[i].Name == 'passphrase') {
|
||||
$scope.EncryptionPassphrase = tmpsettings[i].Value;
|
||||
tmpsettings.splice(i, 1);
|
||||
} else if (tmpsettings[i].Name.indexOf('--') == 0) {
|
||||
res[tmpsettings[i].Name] = tmpsettings[i].Value;
|
||||
} else {
|
||||
res['--' + tmpsettings[i].Name] = tmpsettings[i].Value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user