We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f53908 commit a48a705Copy full SHA for a48a705
src/Umbraco.Examine.Lucene/LuceneIndexDiagnostics.cs
@@ -60,10 +60,17 @@ public LuceneIndexDiagnostics(
60
["LuceneDirectory"] = luceneDir.GetType().Name
61
};
62
63
- if (luceneDir is FSDirectory fsDir)
+ var directoryPath = luceneDir switch
64
+ {
65
+ NRTCachingDirectory nrtDir => nrtDir.Delegate.ToString(),
66
+ FSDirectory fsDir => fsDir.Directory.ToString(),
67
+ _ => null
68
+ };
69
+
70
+ if (directoryPath != null)
71
{
72
var rootDir = _hostingEnvironment.ApplicationPhysicalPath;
- d["LuceneIndexFolder"] = fsDir.Directory.ToString().ToLowerInvariant()
73
+ d["LuceneIndexFolder"] = directoryPath.ToLowerInvariant()
74
.TrimStart(rootDir.ToLowerInvariant()).Replace("\\", " /").EnsureStartsWith('/');
75
}
76
0 commit comments