Save-Image-Info

This commit is contained in:
2023-06-29 22:41:09 -07:00
parent a4dd0fae45
commit 12d2779fa3
21 changed files with 681 additions and 21 deletions

View File

@ -293,15 +293,28 @@ internal abstract class XPath
collection.Clear();
for (int i = 0; i < plusOne; i++)
{
if (i == converted)
checkDirectory = Path.GetFullPath(Path.Combine(resultsFullGroupDirectory, key, propertyConfiguration.ResultAllInOne, new('-', propertyConfiguration.ResultAllInOneSubdirectoryLength)));
if (string.IsNullOrEmpty(key))
{
if (i == converted)
checkDirectory = Path.GetFullPath(Path.Combine(resultsFullGroupDirectory, new('-', propertyConfiguration.ResultAllInOneSubdirectoryLength)));
else
checkDirectory = Path.GetFullPath(Path.Combine(resultsFullGroupDirectory, i.ToString().PadLeft(propertyConfiguration.ResultAllInOneSubdirectoryLength, '0')));
}
else
checkDirectory = Path.GetFullPath(Path.Combine(resultsFullGroupDirectory, key, propertyConfiguration.ResultAllInOne, i.ToString().PadLeft(propertyConfiguration.ResultAllInOneSubdirectoryLength, '0')));
{
if (i == converted)
checkDirectory = Path.GetFullPath(Path.Combine(resultsFullGroupDirectory, key, propertyConfiguration.ResultAllInOne, new('-', propertyConfiguration.ResultAllInOneSubdirectoryLength)));
else
checkDirectory = Path.GetFullPath(Path.Combine(resultsFullGroupDirectory, key, propertyConfiguration.ResultAllInOne, i.ToString().PadLeft(propertyConfiguration.ResultAllInOneSubdirectoryLength, '0')));
}
if (!Directory.Exists(checkDirectory))
_ = Directory.CreateDirectory(checkDirectory);
collection.Add(checkDirectory);
}
results.Add(key, collection.ToArray());
if (!string.IsNullOrEmpty(key))
results.Add(key, collection.ToArray());
else
results.Add(propertyConfiguration.ResultAllInOne, collection.ToArray());
}
}
return results;