fix(server): support import paths with special chars (#14856)

This commit is contained in:
Jonathan Jogenfors
2024-12-22 23:22:16 +01:00
committed by GitHub
parent 4bc2aa5451
commit c3be74c450
2 changed files with 62 additions and 1 deletions

View File

@@ -214,7 +214,7 @@ export class StorageRepository implements IStorageRepository {
}
private asGlob(pathToCrawl: string): string {
const escapedPath = escapePath(pathToCrawl);
const escapedPath = escapePath(pathToCrawl).replaceAll('"', '["]').replaceAll("'", "[']").replaceAll('`', '[`]');
const extensions = `*{${mimeTypes.getSupportedFileExtensions().join(',')}}`;
return `${escapedPath}/**/${extensions}`;
}