jgm / jgm/gitit

Weird behaviour with directories with leading underscore

Open
#459 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
2.3k
Forks
231
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'm seeing some weird gitit behaviour when the directory has a leading _

Let's say I have the repository with two files
a/_b/c.page
a/_b/c.txt

Here is the script to create them quickly
# inside the wikidata repository

mkdir -p a/_b
touch a/_b/c.page
touch a/_b/c.txt
git add a/_b/c.page
git add a/_b/c.txt
git commit -m 'test'

Then when I try to access the txt file (or any non .page extension) it works fine. But when I actually try to access the
http://localhost:5001/a/_b/c
it shows the "Your file is not found" error.

Surely it looks like a bug. I understand that in a few places where the leading underscore is treated specially (e.g. _diff pages and so forth), but I wasn't expecting this to occur with all the underscored names. Furthermore the fact that the non .page files are returned fine is suspicious.

Thanks,
Sergey

PS I'm using 0.10.5 version of gitit

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.