[bug] Local repositories with a space or non-ASCII character in the path cannot be indexed
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
- Add a local repo connection for a directory with a space in its path, e.g.
file:///repos/my repo. - 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
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de sourcebot-dev/sourcebot
-
bug triage needed
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
sourcebot-dev/sourcebot#1681 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
sourcebot-dev/sourcebot#1633 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
sourcebot-dev/sourcebot#1384 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
ask_sb bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
sourcebot-dev/sourcebot#1137 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 48/100
sourcebot-dev/sourcebot#1691 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de sourcebot-dev/sourcebot
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
microsoft/vscode-livepreview#876 ·
Mantenedores costumam responder em até 1 dia
-
needs-triage
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
JustJarethB/invoicer#54 ·
-
ICP 1.2.0 shows a scheduled task's interval in milliseconds under the label "Interval (In seconds)"AbertaNeeds Triage Type/Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
wso2/product-integrator#2585 ·
Mantenedores costumam responder em até 1 dia
-
Add: Telemundo West sdAbertacheck:passed streams:add
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
design
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
MTES-MCT/monitor-field#119 ·
Mantenedores costumam responder em até 1 dia