[bug] Local repositories with a space or non-ASCII character in the path cannot be indexed
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- typescript
- Domaine
- backend
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.)
- Langage dominant
- TypeScript
- Étoiles
- 3.9k
- Forks
- 374
- Merge moyen
- 18 h 46 min
- PR mergées (30 j)
- 41
Préparer son environnement
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de sourcebot-dev/sourcebot
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
sourcebot-dev/sourcebot#1698 ·
Les mainteneurs répondent en général sous 1 jour
-
bug triage needed
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
sourcebot-dev/sourcebot#1681 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
sourcebot-dev/sourcebot#1633 ·
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
sourcebot-dev/sourcebot#1384 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
ask_sb bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
sourcebot-dev/sourcebot#1137 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de sourcebot-dev/sourcebot
Issues similaires
-
area/frontend good first issue kind/cooldown
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
voidzero-dev/oxc-angular-compiler#511 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
langchain-ai/deepagentsjs#898 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 92/100
anomalyco/models.dev#8509 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
bug documentation P2 UI/UX
Difficulté 2/5 1-3 heures Accessibilité débutants 85/100
Les mainteneurs répondent en général sous 1 jour