Fixed the problem where the UI reports a warning but "got 0 warning(s)"

This commit is contained in:
Kenneth Skovhede
2018-02-11 17:54:44 +01:00
parent 50d16b1e49
commit be7cde4e6e
+4 -1
View File
@@ -747,7 +747,10 @@ namespace Duplicati.Server
"Warning" : string.Format("Warning while running {0}", backup.Name),
r.FilesWithError > 0 ?
string.Format("Errors affected {0} file(s) ", r.FilesWithError) :
string.Format("Got {0} warning(s) ", r.Warnings.Count())
(r.Errors.Any() ?
string.Format("Got {0} error(s)", r.Errors.Count()) :
string.Format("Got {0} warning(s)", r.Warnings.Count())
)
,
null,
backup.ID,