From 1b378e4d03748b48eba8c9e5342a5ecda9f640b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boris=20Kapust=C3=ADk?= <82807109+bkapustik@users.noreply.github.com> Date: Tue, 4 Jun 2024 12:23:06 +0200 Subject: [PATCH] fix(lucene storage): incorrect usage of Path.Combine outside windows (#57) --- .../Indexing/ILuceneIndexStorageStrategy.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Kentico.Xperience.Lucene.Core/Indexing/ILuceneIndexStorageStrategy.cs b/src/Kentico.Xperience.Lucene.Core/Indexing/ILuceneIndexStorageStrategy.cs index 080feb0..55f2057 100644 --- a/src/Kentico.Xperience.Lucene.Core/Indexing/ILuceneIndexStorageStrategy.cs +++ b/src/Kentico.Xperience.Lucene.Core/Indexing/ILuceneIndexStorageStrategy.cs @@ -69,10 +69,10 @@ public bool ScheduleRemoval(IndexStorageModel storage) { (string? path, string? taxonomyPath, int generation, bool _) = storage; - string delBase = Path.Combine(path, $@"..\{IndexDeletionDirectoryName}"); + string delBase = Path.Combine(path, "..", IndexDeletionDirectoryName); Directory.CreateDirectory(delBase); - string delPath = Path.Combine(path, $@"..\{IndexDeletionDirectoryName}\{generation:0000000}"); + string delPath = Path.Combine(path, "..", IndexDeletionDirectoryName, $"{generation:0000000}"); try { Directory.Move(path, delPath); @@ -87,7 +87,7 @@ public bool ScheduleRemoval(IndexStorageModel storage) if (!string.IsNullOrWhiteSpace(taxonomyPath) && Directory.Exists(taxonomyPath)) { - string delPathTaxon = Path.Combine(path, $@"..\{IndexDeletionDirectoryName}\{generation:0000000}_taxon"); + string delPathTaxon = Path.Combine(path, "..", IndexDeletionDirectoryName, $"{generation:0000000}_taxon"); try { Directory.Move(taxonomyPath, delPathTaxon);