public void RecalculateChecksum(string path)
{
string checksum;
try
{
checksum = Checksum(path);
}
catch (IOException)
{
Logger.Error("IOException while reading file checksum: " + path);
return;
}
path = Normalize(path);
string command = @"UPDATE files
SET checksum=@checksum
WHERE path=@path";
Dictionary<string, object> parameters = new Dictionary<string, object>();
parameters.Add("checksum", checksum);
parameters.Add("path", path);
ExecuteSQLAction(command, parameters);
}