Runs but broken
This commit is contained in:
@ -250,14 +250,27 @@ internal abstract class DistanceLogic
|
||||
return results;
|
||||
}
|
||||
|
||||
private static void RenameUnknown(string[] files)
|
||||
private static string[] RenameBirth(string[] files)
|
||||
{
|
||||
List<string> results = [];
|
||||
string checkFile;
|
||||
foreach (string file in files)
|
||||
{
|
||||
if (file.EndsWith(".unk"))
|
||||
if (file.EndsWith(".brt"))
|
||||
{
|
||||
results.Add(file);
|
||||
continue;
|
||||
File.Move(file, $"{file}.unk");
|
||||
}
|
||||
checkFile = $"{file}.brt";
|
||||
if (File.Exists(checkFile))
|
||||
{
|
||||
results.Add(file);
|
||||
continue;
|
||||
}
|
||||
File.Move(file, checkFile);
|
||||
results.Add(checkFile);
|
||||
}
|
||||
return results.ToArray();
|
||||
}
|
||||
|
||||
private static void MovedToNewestPersonKeyFormatted(string personKeyFormatted, string newestPersonKeyFormatted, TicksDirectory ticksDirectory, string personKeyDirectory)
|
||||
@ -374,7 +387,7 @@ internal abstract class DistanceLogic
|
||||
}
|
||||
personNameDirectories = Directory.GetDirectories(yearDirectory, "*", SearchOption.TopDirectoryOnly);
|
||||
if (personNameDirectories.Length > 1)
|
||||
throw new NotSupportedException();
|
||||
throw new NotSupportedException("Try deleting *.lnk files!");
|
||||
foreach (string personNameDirectory in personNameDirectories)
|
||||
{
|
||||
directoryNumber++;
|
||||
@ -422,7 +435,7 @@ internal abstract class DistanceLogic
|
||||
if (!isDefault.Value)
|
||||
{
|
||||
if (personKeyFormattedToNewestPersonKeyFormatted.Count > 0 && newestPersonKeyFormatted is null)
|
||||
RenameUnknown(files);
|
||||
files = RenameBirth(files);
|
||||
else if (newestPersonKeyFormatted is not null && personKeyFormatted != newestPersonKeyFormatted)
|
||||
{
|
||||
if (!check)
|
||||
|
Reference in New Issue
Block a user