Merge branch 'master' into angular_ui
This commit is contained in:
@@ -129,9 +129,15 @@ namespace Duplicati.Library.Main.Operation
|
||||
orderby n.Time descending
|
||||
select n;
|
||||
|
||||
if (filelists.Count() <= 0)
|
||||
throw new Exception(string.Format("No filelists found on the remote destinatio"));
|
||||
|
||||
if (filelistfilter != null)
|
||||
filelists = filelistfilter(filelists).Select(x => x.Value).ToArray();
|
||||
|
||||
if (filelists.Count() <= 0)
|
||||
throw new Exception(string.Format("No filelists"));
|
||||
|
||||
// If we are updating, all files should be accounted for
|
||||
foreach(var fl in remotefiles)
|
||||
volumeIds[fl.File.Name] = updating ? restoredb.GetRemoteVolumeID(fl.File.Name) : restoredb.RegisterRemoteVolume(fl.File.Name, fl.FileType, fl.File.Size, RemoteVolumeState.Uploaded);
|
||||
|
||||
@@ -408,7 +408,7 @@ namespace Duplicati.Server.Database
|
||||
|
||||
return new object[] {
|
||||
n.Name,
|
||||
string.Join(",", n.Tags),
|
||||
string.Join(",", n.Tags ?? new string[0]),
|
||||
n.TargetURL,
|
||||
update ? (object)item.ID : (object)n.DBPath
|
||||
};
|
||||
|
||||
@@ -403,6 +403,9 @@ namespace Duplicati.Server.WebServer.RESTMethods
|
||||
public void PUT(string key, RequestInfo info)
|
||||
{
|
||||
string str = info.Request.Form["data"].Value;
|
||||
if (string.IsNullOrWhiteSpace(str))
|
||||
str = new StreamReader(info.Request.Body, System.Text.Encoding.UTF8).ReadToEnd();
|
||||
|
||||
if (string.IsNullOrWhiteSpace(str))
|
||||
{
|
||||
info.ReportClientError("Missing backup object");
|
||||
|
||||
@@ -138,7 +138,11 @@ namespace Duplicati.Server.WebServer.RESTMethods
|
||||
AddOrUpdateBackupData data = null;
|
||||
try
|
||||
{
|
||||
data = Serializer.Deserialize<AddOrUpdateBackupData>(new StringReader(info.Request.Form["data"].Value));
|
||||
var str = info.Request.Form["data"].Value;
|
||||
if (string.IsNullOrWhiteSpace(str))
|
||||
str = new StreamReader(info.Request.Body, System.Text.Encoding.UTF8).ReadToEnd();
|
||||
|
||||
data = Serializer.Deserialize<AddOrUpdateBackupData>(new StringReader(str));
|
||||
if (data.Backup == null)
|
||||
{
|
||||
info.ReportClientError("Data object had no backup entry");
|
||||
|
||||
Reference in New Issue
Block a user