Ready to test Windows Project
This commit is contained in:
@ -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(' ');
|
||||
|
Reference in New Issue
Block a user