Skip to content
Permalink
Browse files

Improved error message for faults in database filelists

  • Loading branch information...
kenkendk committed Oct 17, 2018
1 parent d03a8a7 commit 2826dbe6f04497bcfdb88a9da96ea7e65338f055
Showing with 7 additions and 1 deletion.
  1. +7 −1 Duplicati/Library/Main/Database/LocalDatabase.cs
@@ -813,7 +813,13 @@ public void VerifyConsistency(long blocksize, long hashsize, bool verifyfilelist
var storedlist = cmd2.ExecuteScalarInt64(@"SELECT COUNT(*) FROM ""FilesetEntry"" WHERE ""FilesetEntry"".""FilesetID"" = ?", 0, filesetid);

if (expandedlist != storedlist)
throw new Exception(string.Format("Unexpected difference in fileset {0}, found {1} entries, but expected {2}", filesetid, expandedlist, storedlist));
{
var filesetname = filesetid.ToString();
var fileset = FilesetTimes.Zip(Enumerable.Range(0, FilesetTimes.Count()), (a, b) => new Tuple<long, long, DateTime>(b, a.Key, a.Value)).FirstOrDefault(x => x.Item2 == filesetid);
if (fileset != null)
filesetname = string.Format("version {0}: {1} (database id: {2})", fileset.Item1, fileset.Item3, fileset.Item2);
throw new Interface.UserInformationException(string.Format("Unexpected difference in fileset {0}, found {1} entries, but expected {2}", filesetname, expandedlist, storedlist), "FilesetDifferences");
}
}
}
}

1 comment on commit 2826dbe

@duplicatibot

This comment has been minimized.

Copy link

commented on 2826dbe Nov 24, 2018

This commit has been mentioned on Duplicati. There might be relevant details there:

https://forum.duplicati.com/t/backup-failing-due-to-unexpected-difference-in-fileset/4834/18

Please sign in to comment.
You can’t perform that action at this time.