Skip to content

Commit b6bfdb6

Browse files
committed
fix: apply path.posix.normalize when cleaning prefix to avoid redundant normalization
Addresses review comment from @mrubens to normalize the path at line 385 instead of normalizing twice
1 parent 60c2cde commit b6bfdb6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/services/code-index/vector-store/qdrant-client.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,10 +382,10 @@ export class QdrantVectorStore implements IVectorStore {
382382
filter = undefined
383383
} else {
384384
// Remove leading "./" from paths like "./src" to normalize them
385-
const cleanedPrefix = normalizedPrefix.startsWith("./")
386-
? normalizedPrefix.slice(2)
387-
: normalizedPrefix
388-
const segments = path.posix.normalize(cleanedPrefix).split("/").filter(Boolean)
385+
const cleanedPrefix = path.posix.normalize(
386+
normalizedPrefix.startsWith("./") ? normalizedPrefix.slice(2) : normalizedPrefix,
387+
)
388+
const segments = cleanedPrefix.split("/").filter(Boolean)
389389
if (segments.length > 0) {
390390
filter = {
391391
must: segments.map((segment, index) => ({

0 commit comments

Comments
 (0)