Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

[bug] Local repositories with a space or non-ASCII character in the path cannot be indexed

Aberta
#1,689 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
35/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
backend

Direção de pesquisa

Inspect getRepoPath in packages/shared/src/utils.ts and reproduce the encoded path shown in the issue. Verify the existing unit test mentioned in the report, then confirm that local repositories with spaces or non-ASCII characters resolve to on-disk paths and can be indexed and browsed.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Describe the bug

A local repository (file:// connection) whose path contains a space or a non-ASCII character is discovered but can't be indexed or browsed. getRepoPath in packages/shared/src/utils.ts returns new URL(cloneUrl).pathname, which is percent-encoded, so /Users/me/Code Projects/my repo becomes /Users/me/Code%20Projects/my%20repo. That path is handed to zoekt-git-index and the web git APIs, and it does not exist on disk.

Expected: the on-disk path (fileURLToPath(cloneUrl)).

To reproduce
  1. Add a local repo connection for a directory with a space in its path, e.g. file:///repos/my repo.
  2. The repo shows up, but indexing fails and the file browser can't open it.

Or in code: getRepoPath({ cloneUrl: 'file:///Users/me/Code Projects/my repo', ... }) returns path: '/Users/me/Code%20Projects/my%20repo'.

Sourcebot deployment information

Sourcebot version (e.g. v3.0.1): main @ b4931510 (found reading the source and confirmed with a unit test, not on a deployment)

Additional information

Related to #1385 (Compose mounts for paths with spaces), but this is the path lookup itself. I have a small fix with tests ready and will open a PR that links this issue. (Found by an AI coding agent working for the breken-ai account.)

Linguagem predominante
TypeScript
Estrelas
3.9k
Forks
374
Merge médio
20h 5min
PRs com merge (30d)
38

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de sourcebot-dev/sourcebot

Todas as issues de sourcebot-dev/sourcebot

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.