Ready to test Windows Project

This commit is contained in:
2025-02-16 21:30:17 -07:00
parent 039355f31e
commit 3ea4926f5e
33 changed files with 1226 additions and 205 deletions

View File

@ -58,7 +58,7 @@ internal abstract class XDate
return result;
}
internal static (bool?, string[]) IsWrongYear(FilePath filePath, ExifDirectory exifDirectory)
internal static (bool?, string[]) IsWrongYear(DirectoryInfo directoryInfo, FilePath filePath, ExifDirectory exifDirectory)
{
string[] results = [];
bool? result = null;
@ -67,9 +67,6 @@ internal abstract class XDate
string[] directorySegments;
List<DateTime> collection = [];
string? check = Path.GetFullPath(filePath.FullName);
string? pathRoot = Path.GetPathRoot(filePath.FullName);
if (string.IsNullOrEmpty(pathRoot))
throw new Exception();
DateTime? dateTimeOriginal = GetDateTimeOriginal(exifDirectory);
if (dateTimeOriginal is not null)
collection.Add(dateTimeOriginal.Value);
@ -85,7 +82,7 @@ internal abstract class XDate
for (int i = 0; i < int.MaxValue; i++)
{
check = Path.GetDirectoryName(check);
if (string.IsNullOrEmpty(check) || check == pathRoot)
if (string.IsNullOrEmpty(check) || check == directoryInfo.FullName)
break;
directoryName = Path.GetFileName(check);
directorySegments = directoryName.Split(' ');