PhotoPrism
This commit is contained in:
@ -70,7 +70,8 @@ public class DeleteByDistinct
|
||||
// if (!fileTicksToNames.TryGetValue(fileInfo.LastWriteTime.Ticks, out fileNames))
|
||||
// throw new Exception();
|
||||
// }
|
||||
checkDate = new DateTime(fileInfo.LastWriteTime.Year, fileInfo.LastWriteTime.Month, fileInfo.LastWriteTime.Day);
|
||||
checkDate = new DateTime(ticks);
|
||||
// checkDate = new DateTime(fileInfo.LastWriteTime.Year, fileInfo.LastWriteTime.Month, fileInfo.LastWriteTime.Day);
|
||||
if (!fileTicksToNames.TryGetValue(checkDate.Ticks, out fileNames))
|
||||
{
|
||||
fileTicksToNames.Add(checkDate.Ticks, new());
|
||||
@ -103,7 +104,11 @@ public class DeleteByDistinct
|
||||
if (consoleKey is not null && consoleKey.Value == ConsoleKey.Y)
|
||||
{
|
||||
foreach (string file in deletedFiles)
|
||||
File.Delete(file);
|
||||
{
|
||||
try
|
||||
{ File.Delete(file); }
|
||||
catch (Exception) { }
|
||||
}
|
||||
totalSeconds = (int)Math.Floor(new TimeSpan(DateTime.Now.Ticks - ticks).TotalSeconds);
|
||||
message = $") Looking for empty directories from <{directory}> - {totalSeconds} total second(s)";
|
||||
progressBar = new(4, message, options);
|
||||
|
Reference in New Issue
Block a user