Added a sanity check to the repair process

This commit is contained in:
Kenneth Skovhede
2015-08-26 12:38:49 +01:00
parent 0bfe3daac4
commit fec08eb560
@@ -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);