We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e35e1eb commit 037dfe6Copy full SHA for 037dfe6
1 file changed
src/imgclass.net/Service.cs
@@ -237,6 +237,21 @@ protected void SortImages(List<FileEntry> files)
237
238
protected void LoadFilesAndBuildGroups(string basePath, double ratio)
239
{
240
+ MyLog("Cleaning orphaned file entries...");
241
+ foreach (var key in _files.Keys)
242
+ {
243
+ int orphanCount = 0;
244
+ for (var i = _files[key].Count - 1; i >= 0; i--)
245
246
+ if (!File.Exists(_files[key][i].fn))
247
248
+ _files[key].RemoveAt(i);
249
+ orphanCount++;
250
+ }
251
252
+ if (orphanCount > 0) MyLog($"{key}: removed {orphanCount} orphaned entries");
253
254
+
255
MyLog("Reading new files...");
256
foreach (var path in Directory.GetDirectories(basePath))
257
0 commit comments