refactor checkIfFileWasDeleted

This commit is contained in:
AustrianToast 2023-06-28 00:54:30 +02:00
parent 2b4019d7cf
commit 7d7e9bac6c
No known key found for this signature in database
GPG Key ID: 5CD422268E489EB4

View File

@ -203,7 +203,9 @@ public class ChksumUtils {
while (reader.Read()) { while (reader.Read()) {
pathToFile = reader.GetString(0); pathToFile = reader.GetString(0);
if (!File.Exists(pathToFile)) { if (File.Exists(pathToFile)) {
continue;
}
var deleteCommand = connection.CreateCommand(); var deleteCommand = connection.CreateCommand();
deleteCommand.CommandText = deleteCommand.CommandText =
@" @"
@ -219,7 +221,6 @@ public class ChksumUtils {
} }
} }
} }
}
private List<string> getFilehashesFromDatabase(string connectionString) { private List<string> getFilehashesFromDatabase(string connectionString) {
List<string> filehashesFromDatabase = new List<string>(); List<string> filehashesFromDatabase = new List<string>();