Skip to content

Can't expand folders containing a hash/pound sign/number sign/octothorpe #170

@PathogenDavid

Description

@PathogenDavid

Steps to reproduce:

  1. Go to https://github1s.com/InfectedLibraries/Biohazrd
  2. In the file explorer, try to expand Biohazrd and then #Declarations

Expected behavior:

The folder expands to show its contents:

image

Actual behavior:

The folder appears to contain the contents of its parent:

image


Looking at the request log, it appears that the folder name is getting dropped. It sends a request to https://api.github.com/repos/InfectedLibraries/Biohazrd/git/trees/HEAD:Biohazrd/ instead of https://api.github.com/repos/InfectedLibraries/Biohazrd/git/trees/HEAD:Biohazrd/%23Declarations as expected.

I suspect the fix would be to URL encode the path here:

return fetch(
`https://api.github.com/repos/${owner}/${repo}/git/trees/${ref}${path.replace(
/^\//,
':'
)}`
).catch(handleRequestError);

Unfortunately the setup script isn't working on either Windows or WSL for me otherwise I'd try the fix myself.

Love the concept of this project, looking forward to trying it in my workflow!

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions