Skip to content

Commit

Permalink
fix(lucene storage): incorrect usage of Path.Combine outside windows (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bkapustik authored Jun 4, 2024
1 parent cccc422 commit 1b378e4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit 1b378e4

Please sign in to comment.