PhotoPrism for more locations

This commit is contained in:
2022-12-25 13:54:17 -07:00
parent a510019c1d
commit 37c7b6760d
31 changed files with 395 additions and 509 deletions

View File

@ -216,6 +216,7 @@ public class Container
{
string relativePath;
string checkFileName;
string? checkDirectoryName;
List<string> checkCollection = new();
checkCollection.AddRange(otherCollection);
int length = configuration.RootDirectory.Length;
@ -225,6 +226,9 @@ public class Container
{
relativePath = Shared.Models.Stateless.Methods.IPath.GetRelativePath(fileHolder.FullName, length);
checkFileName = Path.GetFullPath(string.Concat(aPropertySingletonDirectory, relativePath));
checkDirectoryName = Path.GetDirectoryName(checkFileName);
if (string.IsNullOrEmpty(checkDirectoryName) || !Directory.Exists(checkDirectoryName))
continue;
if (!checkCollection.Remove(checkFileName))
File.WriteAllText(checkFileName, string.Empty);
}